import { HttpRequest as __HttpRequest , HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http" ; import { 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 , } from "@aws-sdk/smithy-client" ; import { Endpoint as __Endpoint , HeaderBag as __HeaderBag , MetadataBearer as __MetadataBearer , ResponseMetadata as __ResponseMetadata , SerdeContext as __SerdeContext , SmithyException as __SmithyException , } from "@aws-sdk/types" ; import { CreateCallAnalyticsCategoryCommandInput , CreateCallAnalyticsCategoryCommandOutput , } from "../commands/CreateCallAnalyticsCategoryCommand" ; import { CreateLanguageModelCommandInput , CreateLanguageModelCommandOutput , } from "../commands/CreateLanguageModelCommand" ; import { CreateMedicalVocabularyCommandInput , CreateMedicalVocabularyCommandOutput , } from "../commands/CreateMedicalVocabularyCommand" ; import { CreateVocabularyCommandInput , CreateVocabularyCommandOutput } from "../commands/CreateVocabularyCommand" ; import { CreateVocabularyFilterCommandInput , CreateVocabularyFilterCommandOutput , } from "../commands/CreateVocabularyFilterCommand" ; import { DeleteCallAnalyticsCategoryCommandInput , DeleteCallAnalyticsCategoryCommandOutput , } from "../commands/DeleteCallAnalyticsCategoryCommand" ; import { DeleteCallAnalyticsJobCommandInput , DeleteCallAnalyticsJobCommandOutput , } from "../commands/DeleteCallAnalyticsJobCommand" ; import { DeleteLanguageModelCommandInput , DeleteLanguageModelCommandOutput , } from "../commands/DeleteLanguageModelCommand" ; import { DeleteMedicalTranscriptionJobCommandInput , DeleteMedicalTranscriptionJobCommandOutput , } from "../commands/DeleteMedicalTranscriptionJobCommand" ; import { DeleteMedicalVocabularyCommandInput , DeleteMedicalVocabularyCommandOutput , } from "../commands/DeleteMedicalVocabularyCommand" ; import { DeleteTranscriptionJobCommandInput , DeleteTranscriptionJobCommandOutput , } from "../commands/DeleteTranscriptionJobCommand" ; import { DeleteVocabularyCommandInput , DeleteVocabularyCommandOutput } from "../commands/DeleteVocabularyCommand" ; import { DeleteVocabularyFilterCommandInput , DeleteVocabularyFilterCommandOutput , } from "../commands/DeleteVocabularyFilterCommand" ; import { DescribeLanguageModelCommandInput , DescribeLanguageModelCommandOutput , } from "../commands/DescribeLanguageModelCommand" ; import { GetCallAnalyticsCategoryCommandInput , GetCallAnalyticsCategoryCommandOutput , } from "../commands/GetCallAnalyticsCategoryCommand" ; import { GetCallAnalyticsJobCommandInput , GetCallAnalyticsJobCommandOutput , } from "../commands/GetCallAnalyticsJobCommand" ; import { GetMedicalTranscriptionJobCommandInput , GetMedicalTranscriptionJobCommandOutput , } from "../commands/GetMedicalTranscriptionJobCommand" ; import { GetMedicalVocabularyCommandInput , GetMedicalVocabularyCommandOutput , } from "../commands/GetMedicalVocabularyCommand" ; import { GetTranscriptionJobCommandInput , GetTranscriptionJobCommandOutput , } from "../commands/GetTranscriptionJobCommand" ; import { GetVocabularyCommandInput , GetVocabularyCommandOutput } from "../commands/GetVocabularyCommand" ; import { GetVocabularyFilterCommandInput , GetVocabularyFilterCommandOutput , } from "../commands/GetVocabularyFilterCommand" ; import { ListCallAnalyticsCategoriesCommandInput , ListCallAnalyticsCategoriesCommandOutput , } from "../commands/ListCallAnalyticsCategoriesCommand" ; import { ListCallAnalyticsJobsCommandInput , ListCallAnalyticsJobsCommandOutput , } from "../commands/ListCallAnalyticsJobsCommand" ; import { ListLanguageModelsCommandInput , ListLanguageModelsCommandOutput } from "../commands/ListLanguageModelsCommand" ; import { ListMedicalTranscriptionJobsCommandInput , ListMedicalTranscriptionJobsCommandOutput , } from "../commands/ListMedicalTranscriptionJobsCommand" ; import { ListMedicalVocabulariesCommandInput , ListMedicalVocabulariesCommandOutput , } from "../commands/ListMedicalVocabulariesCommand" ; import { ListTagsForResourceCommandInput , ListTagsForResourceCommandOutput , } from "../commands/ListTagsForResourceCommand" ; import { ListTranscriptionJobsCommandInput , ListTranscriptionJobsCommandOutput , } from "../commands/ListTranscriptionJobsCommand" ; import { ListVocabulariesCommandInput , ListVocabulariesCommandOutput } from "../commands/ListVocabulariesCommand" ; import { ListVocabularyFiltersCommandInput , ListVocabularyFiltersCommandOutput , } from "../commands/ListVocabularyFiltersCommand" ; import { StartCallAnalyticsJobCommandInput , StartCallAnalyticsJobCommandOutput , } from "../commands/StartCallAnalyticsJobCommand" ; import { StartMedicalTranscriptionJobCommandInput , StartMedicalTranscriptionJobCommandOutput , } from "../commands/StartMedicalTranscriptionJobCommand" ; import { StartTranscriptionJobCommandInput , StartTranscriptionJobCommandOutput , } from "../commands/StartTranscriptionJobCommand" ; import { TagResourceCommandInput , TagResourceCommandOutput } from "../commands/TagResourceCommand" ; import { UntagResourceCommandInput , UntagResourceCommandOutput } from "../commands/UntagResourceCommand" ; import { UpdateCallAnalyticsCategoryCommandInput , UpdateCallAnalyticsCategoryCommandOutput , } from "../commands/UpdateCallAnalyticsCategoryCommand" ; import { UpdateMedicalVocabularyCommandInput , UpdateMedicalVocabularyCommandOutput , } from "../commands/UpdateMedicalVocabularyCommand" ; import { UpdateVocabularyCommandInput , UpdateVocabularyCommandOutput } from "../commands/UpdateVocabularyCommand" ; import { UpdateVocabularyFilterCommandInput , UpdateVocabularyFilterCommandOutput , } from "../commands/UpdateVocabularyFilterCommand" ; import { AbsoluteTimeRange , BadRequestException , CallAnalyticsJob , CallAnalyticsJobSettings , CallAnalyticsJobSummary , CategoryProperties , ChannelDefinition , ConflictException , ContentRedaction , CreateCallAnalyticsCategoryRequest , CreateCallAnalyticsCategoryResponse , CreateLanguageModelRequest , CreateLanguageModelResponse , CreateMedicalVocabularyRequest , CreateMedicalVocabularyResponse , CreateVocabularyFilterRequest , CreateVocabularyFilterResponse , CreateVocabularyRequest , CreateVocabularyResponse , DeleteCallAnalyticsCategoryRequest , DeleteCallAnalyticsCategoryResponse , DeleteCallAnalyticsJobRequest , DeleteCallAnalyticsJobResponse , DeleteLanguageModelRequest , DeleteMedicalTranscriptionJobRequest , DeleteMedicalVocabularyRequest , DeleteTranscriptionJobRequest , DeleteVocabularyFilterRequest , DeleteVocabularyRequest , DescribeLanguageModelRequest , DescribeLanguageModelResponse , GetCallAnalyticsCategoryRequest , GetCallAnalyticsCategoryResponse , GetCallAnalyticsJobRequest , GetCallAnalyticsJobResponse , GetMedicalTranscriptionJobRequest , GetMedicalTranscriptionJobResponse , GetMedicalVocabularyRequest , GetMedicalVocabularyResponse , GetTranscriptionJobRequest , GetTranscriptionJobResponse , GetVocabularyFilterRequest , GetVocabularyFilterResponse , GetVocabularyRequest , GetVocabularyResponse , InputDataConfig , InternalFailureException , InterruptionFilter , JobExecutionSettings , LanguageCode , LanguageIdSettings , LanguageModel , LimitExceededException , ListCallAnalyticsCategoriesRequest , ListCallAnalyticsCategoriesResponse , ListCallAnalyticsJobsRequest , ListCallAnalyticsJobsResponse , ListLanguageModelsRequest , ListLanguageModelsResponse , ListMedicalTranscriptionJobsRequest , ListMedicalTranscriptionJobsResponse , ListMedicalVocabulariesRequest , ListMedicalVocabulariesResponse , ListTagsForResourceRequest , ListTagsForResourceResponse , ListTranscriptionJobsRequest , ListTranscriptionJobsResponse , ListVocabulariesRequest , ListVocabulariesResponse , ListVocabularyFiltersRequest , ListVocabularyFiltersResponse , Media , MedicalTranscript , MedicalTranscriptionJob , MedicalTranscriptionJobSummary , MedicalTranscriptionSetting , ModelSettings , NonTalkTimeFilter , NotFoundException , RelativeTimeRange , Rule , SentimentFilter , SentimentValue , Settings , StartCallAnalyticsJobRequest , StartCallAnalyticsJobResponse , StartMedicalTranscriptionJobRequest , StartMedicalTranscriptionJobResponse , StartTranscriptionJobRequest , StartTranscriptionJobResponse , SubtitleFormat , Subtitles , SubtitlesOutput , Tag , TagResourceRequest , TagResourceResponse , Transcript , TranscriptFilter , TranscriptionJob , TranscriptionJobSummary , UntagResourceRequest , UntagResourceResponse , UpdateCallAnalyticsCategoryRequest , UpdateCallAnalyticsCategoryResponse , UpdateMedicalVocabularyRequest , UpdateMedicalVocabularyResponse , UpdateVocabularyFilterRequest , UpdateVocabularyFilterResponse , UpdateVocabularyRequest , UpdateVocabularyResponse , VocabularyFilterInfo , VocabularyInfo , } from "../models/models_0" ; export const serializeAws_json1_1CreateCallAnalyticsCategoryCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.CreateCallAnalyticsCategory" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateCallAnalyticsCategoryRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateLanguageModelCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.CreateLanguageModel" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateLanguageModelRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateMedicalVocabularyCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.CreateMedicalVocabulary" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateMedicalVocabularyRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateVocabularyCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.CreateVocabulary" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateVocabularyRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1CreateVocabularyFilterCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.CreateVocabularyFilter" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1CreateVocabularyFilterRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteCallAnalyticsCategoryCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.DeleteCallAnalyticsCategory" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteCallAnalyticsCategoryRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteCallAnalyticsJobCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.DeleteCallAnalyticsJob" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteCallAnalyticsJobRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteLanguageModelCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.DeleteLanguageModel" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteLanguageModelRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteMedicalTranscriptionJobCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.DeleteMedicalTranscriptionJob" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteMedicalTranscriptionJobRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteMedicalVocabularyCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.DeleteMedicalVocabulary" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteMedicalVocabularyRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteTranscriptionJobCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.DeleteTranscriptionJob" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteTranscriptionJobRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteVocabularyCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.DeleteVocabulary" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteVocabularyRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DeleteVocabularyFilterCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.DeleteVocabularyFilter" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DeleteVocabularyFilterRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1DescribeLanguageModelCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.DescribeLanguageModel" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1DescribeLanguageModelRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetCallAnalyticsCategoryCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.GetCallAnalyticsCategory" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetCallAnalyticsCategoryRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetCallAnalyticsJobCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.GetCallAnalyticsJob" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetCallAnalyticsJobRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetMedicalTranscriptionJobCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.GetMedicalTranscriptionJob" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetMedicalTranscriptionJobRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetMedicalVocabularyCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.GetMedicalVocabulary" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetMedicalVocabularyRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetTranscriptionJobCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.GetTranscriptionJob" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetTranscriptionJobRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetVocabularyCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.GetVocabulary" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetVocabularyRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1GetVocabularyFilterCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.GetVocabularyFilter" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1GetVocabularyFilterRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1ListCallAnalyticsCategoriesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.ListCallAnalyticsCategories" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1ListCallAnalyticsCategoriesRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1ListCallAnalyticsJobsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.ListCallAnalyticsJobs" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1ListCallAnalyticsJobsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1ListLanguageModelsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.ListLanguageModels" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1ListLanguageModelsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1ListMedicalTranscriptionJobsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.ListMedicalTranscriptionJobs" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1ListMedicalTranscriptionJobsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1ListMedicalVocabulariesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.ListMedicalVocabularies" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1ListMedicalVocabulariesRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1ListTagsForResourceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.ListTagsForResource" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1ListTagsForResourceRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1ListTranscriptionJobsCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.ListTranscriptionJobs" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1ListTranscriptionJobsRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1ListVocabulariesCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.ListVocabularies" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1ListVocabulariesRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1ListVocabularyFiltersCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.ListVocabularyFilters" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1ListVocabularyFiltersRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1StartCallAnalyticsJobCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.StartCallAnalyticsJob" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1StartCallAnalyticsJobRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1StartMedicalTranscriptionJobCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.StartMedicalTranscriptionJob" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1StartMedicalTranscriptionJobRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1StartTranscriptionJobCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.StartTranscriptionJob" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1StartTranscriptionJobRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1TagResourceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.TagResource" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1TagResourceRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1UntagResourceCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.UntagResource" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1UntagResourceRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1UpdateCallAnalyticsCategoryCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.UpdateCallAnalyticsCategory" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1UpdateCallAnalyticsCategoryRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1UpdateMedicalVocabularyCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.UpdateMedicalVocabulary" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1UpdateMedicalVocabularyRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1UpdateVocabularyCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.UpdateVocabulary" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1UpdateVocabularyRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const serializeAws_json1_1UpdateVocabularyFilterCommand = async ( input , context ) : Promise < __HttpRequest > => { const headers = { "content-type" : "application/x-amz-json-1.1" , "x-amz-target" : "Transcribe.UpdateVocabularyFilter" , } ; let body ; body = JSON . stringify ( serializeAws_json1_1UpdateVocabularyFilterRequest ( input , context ) ) ; return buildHttpRpcRequest ( context , headers , "/" , undefined , body ) ; } ; export const deserializeAws_json1_1CreateCallAnalyticsCategoryCommand = async ( output , context ) : Promise < CreateCallAnalyticsCategoryCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateCallAnalyticsCategoryCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateCallAnalyticsCategoryResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateCallAnalyticsCategoryCommandError = async ( output , context ) : Promise < CreateCallAnalyticsCategoryCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ConflictException" : case "com.amazonaws.transcribe#ConflictException" : response = { ... ( await deserializeAws_json1_1ConflictExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1CreateLanguageModelCommand = async ( output , context ) : Promise < CreateLanguageModelCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateLanguageModelCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateLanguageModelResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateLanguageModelCommandError = async ( output , context ) : Promise < CreateLanguageModelCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ConflictException" : case "com.amazonaws.transcribe#ConflictException" : response = { ... ( await deserializeAws_json1_1ConflictExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1CreateMedicalVocabularyCommand = async ( output , context ) : Promise < CreateMedicalVocabularyCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateMedicalVocabularyCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateMedicalVocabularyResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateMedicalVocabularyCommandError = async ( output , context ) : Promise < CreateMedicalVocabularyCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ConflictException" : case "com.amazonaws.transcribe#ConflictException" : response = { ... ( await deserializeAws_json1_1ConflictExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1CreateVocabularyCommand = async ( output , context ) : Promise < CreateVocabularyCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateVocabularyCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateVocabularyResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateVocabularyCommandError = async ( output , context ) : Promise < CreateVocabularyCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ConflictException" : case "com.amazonaws.transcribe#ConflictException" : response = { ... ( await deserializeAws_json1_1ConflictExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1CreateVocabularyFilterCommand = async ( output , context ) : Promise < CreateVocabularyFilterCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1CreateVocabularyFilterCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1CreateVocabularyFilterResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1CreateVocabularyFilterCommandError = async ( output , context ) : Promise < CreateVocabularyFilterCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ConflictException" : case "com.amazonaws.transcribe#ConflictException" : response = { ... ( await deserializeAws_json1_1ConflictExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1DeleteCallAnalyticsCategoryCommand = async ( output , context ) : Promise < DeleteCallAnalyticsCategoryCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteCallAnalyticsCategoryCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteCallAnalyticsCategoryResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteCallAnalyticsCategoryCommandError = async ( output , context ) : Promise < DeleteCallAnalyticsCategoryCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.transcribe#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1DeleteCallAnalyticsJobCommand = async ( output , context ) : Promise < DeleteCallAnalyticsJobCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteCallAnalyticsJobCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DeleteCallAnalyticsJobResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteCallAnalyticsJobCommandError = async ( output , context ) : Promise < DeleteCallAnalyticsJobCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1DeleteLanguageModelCommand = async ( output , context ) : Promise < DeleteLanguageModelCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteLanguageModelCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteLanguageModelCommandError = async ( output , context ) : Promise < DeleteLanguageModelCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1DeleteMedicalTranscriptionJobCommand = async ( output , context ) : Promise < DeleteMedicalTranscriptionJobCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteMedicalTranscriptionJobCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteMedicalTranscriptionJobCommandError = async ( output , context ) : Promise < DeleteMedicalTranscriptionJobCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1DeleteMedicalVocabularyCommand = async ( output , context ) : Promise < DeleteMedicalVocabularyCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteMedicalVocabularyCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteMedicalVocabularyCommandError = async ( output , context ) : Promise < DeleteMedicalVocabularyCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.transcribe#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1DeleteTranscriptionJobCommand = async ( output , context ) : Promise < DeleteTranscriptionJobCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteTranscriptionJobCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteTranscriptionJobCommandError = async ( output , context ) : Promise < DeleteTranscriptionJobCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1DeleteVocabularyCommand = async ( output , context ) : Promise < DeleteVocabularyCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteVocabularyCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteVocabularyCommandError = async ( output , context ) : Promise < DeleteVocabularyCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.transcribe#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1DeleteVocabularyFilterCommand = async ( output , context ) : Promise < DeleteVocabularyFilterCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DeleteVocabularyFilterCommandError ( output , context ) ; } await collectBody ( output . body , context ) ; const response = { $metadata : deserializeMetadata ( output ) , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DeleteVocabularyFilterCommandError = async ( output , context ) : Promise < DeleteVocabularyFilterCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.transcribe#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1DescribeLanguageModelCommand = async ( output , context ) : Promise < DescribeLanguageModelCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1DescribeLanguageModelCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1DescribeLanguageModelResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1DescribeLanguageModelCommandError = async ( output , context ) : Promise < DescribeLanguageModelCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.transcribe#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1GetCallAnalyticsCategoryCommand = async ( output , context ) : Promise < GetCallAnalyticsCategoryCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetCallAnalyticsCategoryCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetCallAnalyticsCategoryResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetCallAnalyticsCategoryCommandError = async ( output , context ) : Promise < GetCallAnalyticsCategoryCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.transcribe#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1GetCallAnalyticsJobCommand = async ( output , context ) : Promise < GetCallAnalyticsJobCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetCallAnalyticsJobCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetCallAnalyticsJobResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetCallAnalyticsJobCommandError = async ( output , context ) : Promise < GetCallAnalyticsJobCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.transcribe#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1GetMedicalTranscriptionJobCommand = async ( output , context ) : Promise < GetMedicalTranscriptionJobCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetMedicalTranscriptionJobCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetMedicalTranscriptionJobResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetMedicalTranscriptionJobCommandError = async ( output , context ) : Promise < GetMedicalTranscriptionJobCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.transcribe#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1GetMedicalVocabularyCommand = async ( output , context ) : Promise < GetMedicalVocabularyCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetMedicalVocabularyCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetMedicalVocabularyResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetMedicalVocabularyCommandError = async ( output , context ) : Promise < GetMedicalVocabularyCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.transcribe#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1GetTranscriptionJobCommand = async ( output , context ) : Promise < GetTranscriptionJobCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetTranscriptionJobCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetTranscriptionJobResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetTranscriptionJobCommandError = async ( output , context ) : Promise < GetTranscriptionJobCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.transcribe#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1GetVocabularyCommand = async ( output , context ) : Promise < GetVocabularyCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetVocabularyCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetVocabularyResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetVocabularyCommandError = async ( output , context ) : Promise < GetVocabularyCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.transcribe#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1GetVocabularyFilterCommand = async ( output , context ) : Promise < GetVocabularyFilterCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1GetVocabularyFilterCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1GetVocabularyFilterResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1GetVocabularyFilterCommandError = async ( output , context ) : Promise < GetVocabularyFilterCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.transcribe#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1ListCallAnalyticsCategoriesCommand = async ( output , context ) : Promise < ListCallAnalyticsCategoriesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1ListCallAnalyticsCategoriesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1ListCallAnalyticsCategoriesResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1ListCallAnalyticsCategoriesCommandError = async ( output , context ) : Promise < ListCallAnalyticsCategoriesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1ListCallAnalyticsJobsCommand = async ( output , context ) : Promise < ListCallAnalyticsJobsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1ListCallAnalyticsJobsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1ListCallAnalyticsJobsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1ListCallAnalyticsJobsCommandError = async ( output , context ) : Promise < ListCallAnalyticsJobsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1ListLanguageModelsCommand = async ( output , context ) : Promise < ListLanguageModelsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1ListLanguageModelsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1ListLanguageModelsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1ListLanguageModelsCommandError = async ( output , context ) : Promise < ListLanguageModelsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1ListMedicalTranscriptionJobsCommand = async ( output , context ) : Promise < ListMedicalTranscriptionJobsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1ListMedicalTranscriptionJobsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1ListMedicalTranscriptionJobsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1ListMedicalTranscriptionJobsCommandError = async ( output , context ) : Promise < ListMedicalTranscriptionJobsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1ListMedicalVocabulariesCommand = async ( output , context ) : Promise < ListMedicalVocabulariesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1ListMedicalVocabulariesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1ListMedicalVocabulariesResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1ListMedicalVocabulariesCommandError = async ( output , context ) : Promise < ListMedicalVocabulariesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1ListTagsForResourceCommand = async ( output , context ) : Promise < ListTagsForResourceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1ListTagsForResourceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1ListTagsForResourceResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1ListTagsForResourceCommandError = async ( output , context ) : Promise < ListTagsForResourceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.transcribe#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1ListTranscriptionJobsCommand = async ( output , context ) : Promise < ListTranscriptionJobsCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1ListTranscriptionJobsCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1ListTranscriptionJobsResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1ListTranscriptionJobsCommandError = async ( output , context ) : Promise < ListTranscriptionJobsCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1ListVocabulariesCommand = async ( output , context ) : Promise < ListVocabulariesCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1ListVocabulariesCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1ListVocabulariesResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1ListVocabulariesCommandError = async ( output , context ) : Promise < ListVocabulariesCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1ListVocabularyFiltersCommand = async ( output , context ) : Promise < ListVocabularyFiltersCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1ListVocabularyFiltersCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1ListVocabularyFiltersResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1ListVocabularyFiltersCommandError = async ( output , context ) : Promise < ListVocabularyFiltersCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1StartCallAnalyticsJobCommand = async ( output , context ) : Promise < StartCallAnalyticsJobCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1StartCallAnalyticsJobCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1StartCallAnalyticsJobResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1StartCallAnalyticsJobCommandError = async ( output , context ) : Promise < StartCallAnalyticsJobCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ConflictException" : case "com.amazonaws.transcribe#ConflictException" : response = { ... ( await deserializeAws_json1_1ConflictExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1StartMedicalTranscriptionJobCommand = async ( output , context ) : Promise < StartMedicalTranscriptionJobCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1StartMedicalTranscriptionJobCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1StartMedicalTranscriptionJobResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1StartMedicalTranscriptionJobCommandError = async ( output , context ) : Promise < StartMedicalTranscriptionJobCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ConflictException" : case "com.amazonaws.transcribe#ConflictException" : response = { ... ( await deserializeAws_json1_1ConflictExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1StartTranscriptionJobCommand = async ( output , context ) : Promise < StartTranscriptionJobCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1StartTranscriptionJobCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1StartTranscriptionJobResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1StartTranscriptionJobCommandError = async ( output , context ) : Promise < StartTranscriptionJobCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ConflictException" : case "com.amazonaws.transcribe#ConflictException" : response = { ... ( await deserializeAws_json1_1ConflictExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1TagResourceCommand = async ( output , context ) : Promise < TagResourceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1TagResourceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1TagResourceResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1TagResourceCommandError = async ( output , context ) : Promise < TagResourceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ConflictException" : case "com.amazonaws.transcribe#ConflictException" : response = { ... ( await deserializeAws_json1_1ConflictExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.transcribe#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1UntagResourceCommand = async ( output , context ) : Promise < UntagResourceCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1UntagResourceCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1UntagResourceResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1UntagResourceCommandError = async ( output , context ) : Promise < UntagResourceCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ConflictException" : case "com.amazonaws.transcribe#ConflictException" : response = { ... ( await deserializeAws_json1_1ConflictExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.transcribe#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1UpdateCallAnalyticsCategoryCommand = async ( output , context ) : Promise < UpdateCallAnalyticsCategoryCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1UpdateCallAnalyticsCategoryCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1UpdateCallAnalyticsCategoryResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1UpdateCallAnalyticsCategoryCommandError = async ( output , context ) : Promise < UpdateCallAnalyticsCategoryCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ConflictException" : case "com.amazonaws.transcribe#ConflictException" : response = { ... ( await deserializeAws_json1_1ConflictExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.transcribe#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1UpdateMedicalVocabularyCommand = async ( output , context ) : Promise < UpdateMedicalVocabularyCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1UpdateMedicalVocabularyCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1UpdateMedicalVocabularyResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1UpdateMedicalVocabularyCommandError = async ( output , context ) : Promise < UpdateMedicalVocabularyCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ConflictException" : case "com.amazonaws.transcribe#ConflictException" : response = { ... ( await deserializeAws_json1_1ConflictExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.transcribe#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1UpdateVocabularyCommand = async ( output , context ) : Promise < UpdateVocabularyCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1UpdateVocabularyCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1UpdateVocabularyResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1UpdateVocabularyCommandError = async ( output , context ) : Promise < UpdateVocabularyCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "ConflictException" : case "com.amazonaws.transcribe#ConflictException" : response = { ... ( await deserializeAws_json1_1ConflictExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.transcribe#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; export const deserializeAws_json1_1UpdateVocabularyFilterCommand = async ( output , context ) : Promise < UpdateVocabularyFilterCommandOutput > => { if ( output . statusCode >= 300 ) { return deserializeAws_json1_1UpdateVocabularyFilterCommandError ( output , context ) ; } const data = await parseBody ( output . body , context ) ; let contents = { } ; contents = deserializeAws_json1_1UpdateVocabularyFilterResponse ( data , context ) ; const response = { $metadata : deserializeMetadata ( output ) , ... contents , } ; return Promise . resolve ( response ) ; } ; const deserializeAws_json1_1UpdateVocabularyFilterCommandError = async ( output , context ) : Promise < UpdateVocabularyFilterCommandOutput > => { const parsedOutput = { ... output , body : await parseBody ( output . body , context ) , } ; let response ; let errorCode = "UnknownError" ; errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ; switch ( errorCode ) { case "BadRequestException" : case "com.amazonaws.transcribe#BadRequestException" : response = { ... ( await deserializeAws_json1_1BadRequestExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "InternalFailureException" : case "com.amazonaws.transcribe#InternalFailureException" : response = { ... ( await deserializeAws_json1_1InternalFailureExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "LimitExceededException" : case "com.amazonaws.transcribe#LimitExceededException" : response = { ... ( await deserializeAws_json1_1LimitExceededExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; case "NotFoundException" : case "com.amazonaws.transcribe#NotFoundException" : response = { ... ( await deserializeAws_json1_1NotFoundExceptionResponse ( parsedOutput , context ) ) , name : errorCode , $metadata : deserializeMetadata ( output ) , } ; break ; default : const parsedBody = parsedOutput . body ; errorCode = parsedBody . code || parsedBody . Code || errorCode ; response = { ... parsedBody , name : `${ errorCode }` , message : parsedBody . message || parsedBody . Message || errorCode , $fault : "client" , $metadata : deserializeMetadata ( output ) , } as any ; } const message = response . message || response . Message || errorCode ; response . message = message ; delete response . Message ; return Promise . reject ( Object . assign ( new Error ( message ) , response ) ) ; } ; const deserializeAws_json1_1BadRequestExceptionResponse = async ( parsedOutput , context ) : Promise < BadRequestException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1BadRequestException ( body , context ) ; const contents = { name : "BadRequestException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1ConflictExceptionResponse = async ( parsedOutput , context ) : Promise < ConflictException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1ConflictException ( body , context ) ; const contents = { name : "ConflictException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1InternalFailureExceptionResponse = async ( parsedOutput , context ) : Promise < InternalFailureException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1InternalFailureException ( body , context ) ; const contents = { name : "InternalFailureException" , $fault : "server" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1LimitExceededExceptionResponse = async ( parsedOutput , context ) : Promise < LimitExceededException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1LimitExceededException ( body , context ) ; const contents = { name : "LimitExceededException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const deserializeAws_json1_1NotFoundExceptionResponse = async ( parsedOutput , context ) : Promise < NotFoundException > => { const body = parsedOutput . body ; const deserialized = deserializeAws_json1_1NotFoundException ( body , context ) ; const contents = { name : "NotFoundException" , $fault : "client" , $metadata : deserializeMetadata ( parsedOutput ) , ... deserialized , } ; return contents ; } ; const serializeAws_json1_1AbsoluteTimeRange = ( input , context ) : any => { return { ... ( input . EndTime !== undefined && input . EndTime !== null && { EndTime : input . EndTime } ) , ... ( input . First !== undefined && input . First !== null && { First : input . First } ) , ... ( input . Last !== undefined && input . Last !== null && { Last : input . Last } ) , ... ( input . StartTime !== undefined && input . StartTime !== null && { StartTime : input . StartTime } ) , } ; } ; const serializeAws_json1_1CallAnalyticsJobSettings = ( input , context ) : any => { return { ... ( input . ContentRedaction !== undefined && input . ContentRedaction !== null && { ContentRedaction : serializeAws_json1_1ContentRedaction ( input . ContentRedaction , context ) , } ) , ... ( input . LanguageIdSettings !== undefined && input . LanguageIdSettings !== null && { LanguageIdSettings : serializeAws_json1_1LanguageIdSettingsMap ( input . LanguageIdSettings , context ) , } ) , ... ( input . LanguageModelName !== undefined && input . LanguageModelName !== null && { LanguageModelName : input . LanguageModelName } ) , ... ( input . LanguageOptions !== undefined && input . LanguageOptions !== null && { LanguageOptions : serializeAws_json1_1LanguageOptions ( input . LanguageOptions , context ) , } ) , ... ( input . VocabularyFilterMethod !== undefined && input . VocabularyFilterMethod !== null && { VocabularyFilterMethod : input . VocabularyFilterMethod } ) , ... ( input . VocabularyFilterName !== undefined && input . VocabularyFilterName !== null && { VocabularyFilterName : input . VocabularyFilterName } ) , ... ( input . VocabularyName !== undefined && input . VocabularyName !== null && { VocabularyName : input . VocabularyName } ) , } ; } ; const serializeAws_json1_1ChannelDefinition = ( input , context ) : any => { return { ... ( input . ChannelId !== undefined && input . ChannelId !== null && { ChannelId : input . ChannelId } ) , ... ( input . ParticipantRole !== undefined && input . ParticipantRole !== null && { ParticipantRole : input . ParticipantRole } ) , } ; } ; const serializeAws_json1_1ChannelDefinitions = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return serializeAws_json1_1ChannelDefinition ( entry , context ) ; } ) ; } ; const serializeAws_json1_1ContentRedaction = ( input , context ) : any => { return { ... ( input . RedactionOutput !== undefined && input . RedactionOutput !== null && { RedactionOutput : input . RedactionOutput } ) , ... ( input . RedactionType !== undefined && input . RedactionType !== null && { RedactionType : input . RedactionType } ) , } ; } ; const serializeAws_json1_1CreateCallAnalyticsCategoryRequest = ( input , context ) : any => { return { ... ( input . CategoryName !== undefined && input . CategoryName !== null && { CategoryName : input . CategoryName } ) , ... ( input . Rules !== undefined && input . Rules !== null && { Rules : serializeAws_json1_1RuleList ( input . Rules , context ) } ) , } ; } ; const serializeAws_json1_1CreateLanguageModelRequest = ( input , context ) : any => { return { ... ( input . BaseModelName !== undefined && input . BaseModelName !== null && { BaseModelName : input . BaseModelName } ) , ... ( input . InputDataConfig !== undefined && input . InputDataConfig !== null && { InputDataConfig : serializeAws_json1_1InputDataConfig ( input . InputDataConfig , context ) , } ) , ... ( input . LanguageCode !== undefined && input . LanguageCode !== null && { LanguageCode : input . LanguageCode } ) , ... ( input . ModelName !== undefined && input . ModelName !== null && { ModelName : input . ModelName } ) , ... ( input . Tags !== undefined && input . Tags !== null && { Tags : serializeAws_json1_1TagList ( input . Tags , context ) } ) , } ; } ; const serializeAws_json1_1CreateMedicalVocabularyRequest = ( input , context ) : any => { return { ... ( input . LanguageCode !== undefined && input . LanguageCode !== null && { LanguageCode : input . LanguageCode } ) , ... ( input . Tags !== undefined && input . Tags !== null && { Tags : serializeAws_json1_1TagList ( input . Tags , context ) } ) , ... ( input . VocabularyFileUri !== undefined && input . VocabularyFileUri !== null && { VocabularyFileUri : input . VocabularyFileUri } ) , ... ( input . VocabularyName !== undefined && input . VocabularyName !== null && { VocabularyName : input . VocabularyName } ) , } ; } ; const serializeAws_json1_1CreateVocabularyFilterRequest = ( input , context ) : any => { return { ... ( input . LanguageCode !== undefined && input . LanguageCode !== null && { LanguageCode : input . LanguageCode } ) , ... ( input . Tags !== undefined && input . Tags !== null && { Tags : serializeAws_json1_1TagList ( input . Tags , context ) } ) , ... ( input . VocabularyFilterFileUri !== undefined && input . VocabularyFilterFileUri !== null && { VocabularyFilterFileUri : input . VocabularyFilterFileUri } ) , ... ( input . VocabularyFilterName !== undefined && input . VocabularyFilterName !== null && { VocabularyFilterName : input . VocabularyFilterName } ) , ... ( input . Words !== undefined && input . Words !== null && { Words : serializeAws_json1_1Words ( input . Words , context ) } ) , } ; } ; const serializeAws_json1_1CreateVocabularyRequest = ( input , context ) : any => { return { ... ( input . LanguageCode !== undefined && input . LanguageCode !== null && { LanguageCode : input . LanguageCode } ) , ... ( input . Phrases !== undefined && input . Phrases !== null && { Phrases : serializeAws_json1_1Phrases ( input . Phrases , context ) } ) , ... ( input . Tags !== undefined && input . Tags !== null && { Tags : serializeAws_json1_1TagList ( input . Tags , context ) } ) , ... ( input . VocabularyFileUri !== undefined && input . VocabularyFileUri !== null && { VocabularyFileUri : input . VocabularyFileUri } ) , ... ( input . VocabularyName !== undefined && input . VocabularyName !== null && { VocabularyName : input . VocabularyName } ) , } ; } ; const serializeAws_json1_1DeleteCallAnalyticsCategoryRequest = ( input , context ) : any => { return { ... ( input . CategoryName !== undefined && input . CategoryName !== null && { CategoryName : input . CategoryName } ) , } ; } ; const serializeAws_json1_1DeleteCallAnalyticsJobRequest = ( input , context ) : any => { return { ... ( input . CallAnalyticsJobName !== undefined && input . CallAnalyticsJobName !== null && { CallAnalyticsJobName : input . CallAnalyticsJobName } ) , } ; } ; const serializeAws_json1_1DeleteLanguageModelRequest = ( input , context ) : any => { return { ... ( input . ModelName !== undefined && input . ModelName !== null && { ModelName : input . ModelName } ) , } ; } ; const serializeAws_json1_1DeleteMedicalTranscriptionJobRequest = ( input , context ) : any => { return { ... ( input . MedicalTranscriptionJobName !== undefined && input . MedicalTranscriptionJobName !== null && { MedicalTranscriptionJobName : input . MedicalTranscriptionJobName } ) , } ; } ; const serializeAws_json1_1DeleteMedicalVocabularyRequest = ( input , context ) : any => { return { ... ( input . VocabularyName !== undefined && input . VocabularyName !== null && { VocabularyName : input . VocabularyName } ) , } ; } ; const serializeAws_json1_1DeleteTranscriptionJobRequest = ( input , context ) : any => { return { ... ( input . TranscriptionJobName !== undefined && input . TranscriptionJobName !== null && { TranscriptionJobName : input . TranscriptionJobName } ) , } ; } ; const serializeAws_json1_1DeleteVocabularyFilterRequest = ( input , context ) : any => { return { ... ( input . VocabularyFilterName !== undefined && input . VocabularyFilterName !== null && { VocabularyFilterName : input . VocabularyFilterName } ) , } ; } ; const serializeAws_json1_1DeleteVocabularyRequest = ( input , context ) : any => { return { ... ( input . VocabularyName !== undefined && input . VocabularyName !== null && { VocabularyName : input . VocabularyName } ) , } ; } ; const serializeAws_json1_1DescribeLanguageModelRequest = ( input , context ) : any => { return { ... ( input . ModelName !== undefined && input . ModelName !== null && { ModelName : input . ModelName } ) , } ; } ; const serializeAws_json1_1GetCallAnalyticsCategoryRequest = ( input , context ) : any => { return { ... ( input . CategoryName !== undefined && input . CategoryName !== null && { CategoryName : input . CategoryName } ) , } ; } ; const serializeAws_json1_1GetCallAnalyticsJobRequest = ( input , context ) : any => { return { ... ( input . CallAnalyticsJobName !== undefined && input . CallAnalyticsJobName !== null && { CallAnalyticsJobName : input . CallAnalyticsJobName } ) , } ; } ; const serializeAws_json1_1GetMedicalTranscriptionJobRequest = ( input , context ) : any => { return { ... ( input . MedicalTranscriptionJobName !== undefined && input . MedicalTranscriptionJobName !== null && { MedicalTranscriptionJobName : input . MedicalTranscriptionJobName } ) , } ; } ; const serializeAws_json1_1GetMedicalVocabularyRequest = ( input , context ) : any => { return { ... ( input . VocabularyName !== undefined && input . VocabularyName !== null && { VocabularyName : input . VocabularyName } ) , } ; } ; const serializeAws_json1_1GetTranscriptionJobRequest = ( input , context ) : any => { return { ... ( input . TranscriptionJobName !== undefined && input . TranscriptionJobName !== null && { TranscriptionJobName : input . TranscriptionJobName } ) , } ; } ; const serializeAws_json1_1GetVocabularyFilterRequest = ( input , context ) : any => { return { ... ( input . VocabularyFilterName !== undefined && input . VocabularyFilterName !== null && { VocabularyFilterName : input . VocabularyFilterName } ) , } ; } ; const serializeAws_json1_1GetVocabularyRequest = ( input , context ) : any => { return { ... ( input . VocabularyName !== undefined && input . VocabularyName !== null && { VocabularyName : input . VocabularyName } ) , } ; } ; const serializeAws_json1_1InputDataConfig = ( input , context ) : any => { return { ... ( input . DataAccessRoleArn !== undefined && input . DataAccessRoleArn !== null && { DataAccessRoleArn : input . DataAccessRoleArn } ) , ... ( input . S3Uri !== undefined && input . S3Uri !== null && { S3Uri : input . S3Uri } ) , ... ( input . TuningDataS3Uri !== undefined && input . TuningDataS3Uri !== null && { TuningDataS3Uri : input . TuningDataS3Uri } ) , } ; } ; const serializeAws_json1_1InterruptionFilter = ( input , context ) : any => { return { ... ( input . AbsoluteTimeRange !== undefined && input . AbsoluteTimeRange !== null && { AbsoluteTimeRange : serializeAws_json1_1AbsoluteTimeRange ( input . AbsoluteTimeRange , context ) , } ) , ... ( input . Negate !== undefined && input . Negate !== null && { Negate : input . Negate } ) , ... ( input . ParticipantRole !== undefined && input . ParticipantRole !== null && { ParticipantRole : input . ParticipantRole } ) , ... ( input . RelativeTimeRange !== undefined && input . RelativeTimeRange !== null && { RelativeTimeRange : serializeAws_json1_1RelativeTimeRange ( input . RelativeTimeRange , context ) , } ) , ... ( input . Threshold !== undefined && input . Threshold !== null && { Threshold : input . Threshold } ) , } ; } ; const serializeAws_json1_1JobExecutionSettings = ( input , context ) : any => { return { ... ( input . AllowDeferredExecution !== undefined && input . AllowDeferredExecution !== null && { AllowDeferredExecution : input . AllowDeferredExecution } ) , ... ( input . DataAccessRoleArn !== undefined && input . DataAccessRoleArn !== null && { DataAccessRoleArn : input . DataAccessRoleArn } ) , } ; } ; const serializeAws_json1_1KMSEncryptionContextMap = ( input , context ) : any => { return Object . entries ( input ) . reduce ( ( acc , [ key , value ] ) => { if ( value === null ) { return acc ; } return { ... acc , [ key ] : value , } ; } , { } ) ; } ; const serializeAws_json1_1LanguageIdSettings = ( input , context ) : any => { return { ... ( input . LanguageModelName !== undefined && input . LanguageModelName !== null && { LanguageModelName : input . LanguageModelName } ) , ... ( input . VocabularyFilterName !== undefined && input . VocabularyFilterName !== null && { VocabularyFilterName : input . VocabularyFilterName } ) , ... ( input . VocabularyName !== undefined && input . VocabularyName !== null && { VocabularyName : input . VocabularyName } ) , } ; } ; const serializeAws_json1_1LanguageIdSettingsMap = ( input , context ) : any => { return Object . entries ( input ) . reduce ( ( acc , [ key , value ] ) => { if ( value === null ) { return acc ; } return { ... acc , [ key ] : serializeAws_json1_1LanguageIdSettings ( value , context ) , } ; } , { } ) ; } ; const serializeAws_json1_1LanguageOptions = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1ListCallAnalyticsCategoriesRequest = ( input , context ) : any => { return { ... ( input . MaxResults !== undefined && input . MaxResults !== null && { MaxResults : input . MaxResults } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , } ; } ; const serializeAws_json1_1ListCallAnalyticsJobsRequest = ( input , context ) : any => { return { ... ( input . JobNameContains !== undefined && input . JobNameContains !== null && { JobNameContains : input . JobNameContains } ) , ... ( input . MaxResults !== undefined && input . MaxResults !== null && { MaxResults : input . MaxResults } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , ... ( input . Status !== undefined && input . Status !== null && { Status : input . Status } ) , } ; } ; const serializeAws_json1_1ListLanguageModelsRequest = ( input , context ) : any => { return { ... ( input . MaxResults !== undefined && input . MaxResults !== null && { MaxResults : input . MaxResults } ) , ... ( input . NameContains !== undefined && input . NameContains !== null && { NameContains : input . NameContains } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , ... ( input . StatusEquals !== undefined && input . StatusEquals !== null && { StatusEquals : input . StatusEquals } ) , } ; } ; const serializeAws_json1_1ListMedicalTranscriptionJobsRequest = ( input , context ) : any => { return { ... ( input . JobNameContains !== undefined && input . JobNameContains !== null && { JobNameContains : input . JobNameContains } ) , ... ( input . MaxResults !== undefined && input . MaxResults !== null && { MaxResults : input . MaxResults } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , ... ( input . Status !== undefined && input . Status !== null && { Status : input . Status } ) , } ; } ; const serializeAws_json1_1ListMedicalVocabulariesRequest = ( input , context ) : any => { return { ... ( input . MaxResults !== undefined && input . MaxResults !== null && { MaxResults : input . MaxResults } ) , ... ( input . NameContains !== undefined && input . NameContains !== null && { NameContains : input . NameContains } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , ... ( input . StateEquals !== undefined && input . StateEquals !== null && { StateEquals : input . StateEquals } ) , } ; } ; const serializeAws_json1_1ListTagsForResourceRequest = ( input , context ) : any => { return { ... ( input . ResourceArn !== undefined && input . ResourceArn !== null && { ResourceArn : input . ResourceArn } ) , } ; } ; const serializeAws_json1_1ListTranscriptionJobsRequest = ( input , context ) : any => { return { ... ( input . JobNameContains !== undefined && input . JobNameContains !== null && { JobNameContains : input . JobNameContains } ) , ... ( input . MaxResults !== undefined && input . MaxResults !== null && { MaxResults : input . MaxResults } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , ... ( input . Status !== undefined && input . Status !== null && { Status : input . Status } ) , } ; } ; const serializeAws_json1_1ListVocabulariesRequest = ( input , context ) : any => { return { ... ( input . MaxResults !== undefined && input . MaxResults !== null && { MaxResults : input . MaxResults } ) , ... ( input . NameContains !== undefined && input . NameContains !== null && { NameContains : input . NameContains } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , ... ( input . StateEquals !== undefined && input . StateEquals !== null && { StateEquals : input . StateEquals } ) , } ; } ; const serializeAws_json1_1ListVocabularyFiltersRequest = ( input , context ) : any => { return { ... ( input . MaxResults !== undefined && input . MaxResults !== null && { MaxResults : input . MaxResults } ) , ... ( input . NameContains !== undefined && input . NameContains !== null && { NameContains : input . NameContains } ) , ... ( input . NextToken !== undefined && input . NextToken !== null && { NextToken : input . NextToken } ) , } ; } ; const serializeAws_json1_1Media = ( input , context ) : any => { return { ... ( input . MediaFileUri !== undefined && input . MediaFileUri !== null && { MediaFileUri : input . MediaFileUri } ) , ... ( input . RedactedMediaFileUri !== undefined && input . RedactedMediaFileUri !== null && { RedactedMediaFileUri : input . RedactedMediaFileUri } ) , } ; } ; const serializeAws_json1_1MedicalTranscriptionSetting = ( input , context ) : any => { return { ... ( input . ChannelIdentification !== undefined && input . ChannelIdentification !== null && { ChannelIdentification : input . ChannelIdentification } ) , ... ( input . MaxAlternatives !== undefined && input . MaxAlternatives !== null && { MaxAlternatives : input . MaxAlternatives } ) , ... ( input . MaxSpeakerLabels !== undefined && input . MaxSpeakerLabels !== null && { MaxSpeakerLabels : input . MaxSpeakerLabels } ) , ... ( input . ShowAlternatives !== undefined && input . ShowAlternatives !== null && { ShowAlternatives : input . ShowAlternatives } ) , ... ( input . ShowSpeakerLabels !== undefined && input . ShowSpeakerLabels !== null && { ShowSpeakerLabels : input . ShowSpeakerLabels } ) , ... ( input . VocabularyName !== undefined && input . VocabularyName !== null && { VocabularyName : input . VocabularyName } ) , } ; } ; const serializeAws_json1_1ModelSettings = ( input , context ) : any => { return { ... ( input . LanguageModelName !== undefined && input . LanguageModelName !== null && { LanguageModelName : input . LanguageModelName } ) , } ; } ; const serializeAws_json1_1NonTalkTimeFilter = ( input , context ) : any => { return { ... ( input . AbsoluteTimeRange !== undefined && input . AbsoluteTimeRange !== null && { AbsoluteTimeRange : serializeAws_json1_1AbsoluteTimeRange ( input . AbsoluteTimeRange , context ) , } ) , ... ( input . Negate !== undefined && input . Negate !== null && { Negate : input . Negate } ) , ... ( input . RelativeTimeRange !== undefined && input . RelativeTimeRange !== null && { RelativeTimeRange : serializeAws_json1_1RelativeTimeRange ( input . RelativeTimeRange , context ) , } ) , ... ( input . Threshold !== undefined && input . Threshold !== null && { Threshold : input . Threshold } ) , } ; } ; const serializeAws_json1_1Phrases = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1RelativeTimeRange = ( input , context ) : any => { return { ... ( input . EndPercentage !== undefined && input . EndPercentage !== null && { EndPercentage : input . EndPercentage } ) , ... ( input . First !== undefined && input . First !== null && { First : input . First } ) , ... ( input . Last !== undefined && input . Last !== null && { Last : input . Last } ) , ... ( input . StartPercentage !== undefined && input . StartPercentage !== null && { StartPercentage : input . StartPercentage } ) , } ; } ; const serializeAws_json1_1Rule = ( input , context ) : any => { return Rule . visit ( input , { InterruptionFilter : ( value ) => ( { InterruptionFilter : serializeAws_json1_1InterruptionFilter ( value , context ) } ) , NonTalkTimeFilter : ( value ) => ( { NonTalkTimeFilter : serializeAws_json1_1NonTalkTimeFilter ( value , context ) } ) , SentimentFilter : ( value ) => ( { SentimentFilter : serializeAws_json1_1SentimentFilter ( value , context ) } ) , TranscriptFilter : ( value ) => ( { TranscriptFilter : serializeAws_json1_1TranscriptFilter ( value , context ) } ) , _ : ( name , value ) => ( { name : value } as any ) , } ) ; } ; const serializeAws_json1_1RuleList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return serializeAws_json1_1Rule ( entry , context ) ; } ) ; } ; const serializeAws_json1_1SentimentFilter = ( input , context ) : any => { return { ... ( input . AbsoluteTimeRange !== undefined && input . AbsoluteTimeRange !== null && { AbsoluteTimeRange : serializeAws_json1_1AbsoluteTimeRange ( input . AbsoluteTimeRange , context ) , } ) , ... ( input . Negate !== undefined && input . Negate !== null && { Negate : input . Negate } ) , ... ( input . ParticipantRole !== undefined && input . ParticipantRole !== null && { ParticipantRole : input . ParticipantRole } ) , ... ( input . RelativeTimeRange !== undefined && input . RelativeTimeRange !== null && { RelativeTimeRange : serializeAws_json1_1RelativeTimeRange ( input . RelativeTimeRange , context ) , } ) , ... ( input . Sentiments !== undefined && input . Sentiments !== null && { Sentiments : serializeAws_json1_1SentimentValueList ( input . Sentiments , context ) } ) , } ; } ; const serializeAws_json1_1SentimentValueList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1Settings = ( input , context ) : any => { return { ... ( input . ChannelIdentification !== undefined && input . ChannelIdentification !== null && { ChannelIdentification : input . ChannelIdentification } ) , ... ( input . MaxAlternatives !== undefined && input . MaxAlternatives !== null && { MaxAlternatives : input . MaxAlternatives } ) , ... ( input . MaxSpeakerLabels !== undefined && input . MaxSpeakerLabels !== null && { MaxSpeakerLabels : input . MaxSpeakerLabels } ) , ... ( input . ShowAlternatives !== undefined && input . ShowAlternatives !== null && { ShowAlternatives : input . ShowAlternatives } ) , ... ( input . ShowSpeakerLabels !== undefined && input . ShowSpeakerLabels !== null && { ShowSpeakerLabels : input . ShowSpeakerLabels } ) , ... ( input . VocabularyFilterMethod !== undefined && input . VocabularyFilterMethod !== null && { VocabularyFilterMethod : input . VocabularyFilterMethod } ) , ... ( input . VocabularyFilterName !== undefined && input . VocabularyFilterName !== null && { VocabularyFilterName : input . VocabularyFilterName } ) , ... ( input . VocabularyName !== undefined && input . VocabularyName !== null && { VocabularyName : input . VocabularyName } ) , } ; } ; const serializeAws_json1_1StartCallAnalyticsJobRequest = ( input , context ) : any => { return { ... ( input . CallAnalyticsJobName !== undefined && input . CallAnalyticsJobName !== null && { CallAnalyticsJobName : input . CallAnalyticsJobName } ) , ... ( input . ChannelDefinitions !== undefined && input . ChannelDefinitions !== null && { ChannelDefinitions : serializeAws_json1_1ChannelDefinitions ( input . ChannelDefinitions , context ) , } ) , ... ( input . DataAccessRoleArn !== undefined && input . DataAccessRoleArn !== null && { DataAccessRoleArn : input . DataAccessRoleArn } ) , ... ( input . Media !== undefined && input . Media !== null && { Media : serializeAws_json1_1Media ( input . Media , context ) } ) , ... ( input . OutputEncryptionKMSKeyId !== undefined && input . OutputEncryptionKMSKeyId !== null && { OutputEncryptionKMSKeyId : input . OutputEncryptionKMSKeyId } ) , ... ( input . OutputLocation !== undefined && input . OutputLocation !== null && { OutputLocation : input . OutputLocation } ) , ... ( input . Settings !== undefined && input . Settings !== null && { Settings : serializeAws_json1_1CallAnalyticsJobSettings ( input . Settings , context ) } ) , } ; } ; const serializeAws_json1_1StartMedicalTranscriptionJobRequest = ( input , context ) : any => { return { ... ( input . ContentIdentificationType !== undefined && input . ContentIdentificationType !== null && { ContentIdentificationType : input . ContentIdentificationType } ) , ... ( input . KMSEncryptionContext !== undefined && input . KMSEncryptionContext !== null && { KMSEncryptionContext : serializeAws_json1_1KMSEncryptionContextMap ( input . KMSEncryptionContext , context ) , } ) , ... ( input . LanguageCode !== undefined && input . LanguageCode !== null && { LanguageCode : input . LanguageCode } ) , ... ( input . Media !== undefined && input . Media !== null && { Media : serializeAws_json1_1Media ( input . Media , context ) } ) , ... ( input . MediaFormat !== undefined && input . MediaFormat !== null && { MediaFormat : input . MediaFormat } ) , ... ( input . MediaSampleRateHertz !== undefined && input . MediaSampleRateHertz !== null && { MediaSampleRateHertz : input . MediaSampleRateHertz } ) , ... ( input . MedicalTranscriptionJobName !== undefined && input . MedicalTranscriptionJobName !== null && { MedicalTranscriptionJobName : input . MedicalTranscriptionJobName } ) , ... ( input . OutputBucketName !== undefined && input . OutputBucketName !== null && { OutputBucketName : input . OutputBucketName } ) , ... ( input . OutputEncryptionKMSKeyId !== undefined && input . OutputEncryptionKMSKeyId !== null && { OutputEncryptionKMSKeyId : input . OutputEncryptionKMSKeyId } ) , ... ( input . OutputKey !== undefined && input . OutputKey !== null && { OutputKey : input . OutputKey } ) , ... ( input . Settings !== undefined && input . Settings !== null && { Settings : serializeAws_json1_1MedicalTranscriptionSetting ( input . Settings , context ) , } ) , ... ( input . Specialty !== undefined && input . Specialty !== null && { Specialty : input . Specialty } ) , ... ( input . Tags !== undefined && input . Tags !== null && { Tags : serializeAws_json1_1TagList ( input . Tags , context ) } ) , ... ( input . Type !== undefined && input . Type !== null && { Type : input . Type } ) , } ; } ; const serializeAws_json1_1StartTranscriptionJobRequest = ( input , context ) : any => { return { ... ( input . ContentRedaction !== undefined && input . ContentRedaction !== null && { ContentRedaction : serializeAws_json1_1ContentRedaction ( input . ContentRedaction , context ) , } ) , ... ( input . IdentifyLanguage !== undefined && input . IdentifyLanguage !== null && { IdentifyLanguage : input . IdentifyLanguage } ) , ... ( input . JobExecutionSettings !== undefined && input . JobExecutionSettings !== null && { JobExecutionSettings : serializeAws_json1_1JobExecutionSettings ( input . JobExecutionSettings , context ) , } ) , ... ( input . KMSEncryptionContext !== undefined && input . KMSEncryptionContext !== null && { KMSEncryptionContext : serializeAws_json1_1KMSEncryptionContextMap ( input . KMSEncryptionContext , context ) , } ) , ... ( input . LanguageCode !== undefined && input . LanguageCode !== null && { LanguageCode : input . LanguageCode } ) , ... ( input . LanguageIdSettings !== undefined && input . LanguageIdSettings !== null && { LanguageIdSettings : serializeAws_json1_1LanguageIdSettingsMap ( input . LanguageIdSettings , context ) , } ) , ... ( input . LanguageOptions !== undefined && input . LanguageOptions !== null && { LanguageOptions : serializeAws_json1_1LanguageOptions ( input . LanguageOptions , context ) , } ) , ... ( input . Media !== undefined && input . Media !== null && { Media : serializeAws_json1_1Media ( input . Media , context ) } ) , ... ( input . MediaFormat !== undefined && input . MediaFormat !== null && { MediaFormat : input . MediaFormat } ) , ... ( input . MediaSampleRateHertz !== undefined && input . MediaSampleRateHertz !== null && { MediaSampleRateHertz : input . MediaSampleRateHertz } ) , ... ( input . ModelSettings !== undefined && input . ModelSettings !== null && { ModelSettings : serializeAws_json1_1ModelSettings ( input . ModelSettings , context ) , } ) , ... ( input . OutputBucketName !== undefined && input . OutputBucketName !== null && { OutputBucketName : input . OutputBucketName } ) , ... ( input . OutputEncryptionKMSKeyId !== undefined && input . OutputEncryptionKMSKeyId !== null && { OutputEncryptionKMSKeyId : input . OutputEncryptionKMSKeyId } ) , ... ( input . OutputKey !== undefined && input . OutputKey !== null && { OutputKey : input . OutputKey } ) , ... ( input . Settings !== undefined && input . Settings !== null && { Settings : serializeAws_json1_1Settings ( input . Settings , context ) } ) , ... ( input . Subtitles !== undefined && input . Subtitles !== null && { Subtitles : serializeAws_json1_1Subtitles ( input . Subtitles , context ) } ) , ... ( input . Tags !== undefined && input . Tags !== null && { Tags : serializeAws_json1_1TagList ( input . Tags , context ) } ) , ... ( input . TranscriptionJobName !== undefined && input . TranscriptionJobName !== null && { TranscriptionJobName : input . TranscriptionJobName } ) , } ; } ; const serializeAws_json1_1StringTargetList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1SubtitleFormats = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1Subtitles = ( input , context ) : any => { return { ... ( input . Formats !== undefined && input . Formats !== null && { Formats : serializeAws_json1_1SubtitleFormats ( input . Formats , context ) } ) , } ; } ; const serializeAws_json1_1Tag = ( input , context ) : any => { return { ... ( input . Key !== undefined && input . Key !== null && { Key : input . Key } ) , ... ( input . Value !== undefined && input . Value !== null && { Value : input . Value } ) , } ; } ; const serializeAws_json1_1TagKeyList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const serializeAws_json1_1TagList = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return serializeAws_json1_1Tag ( entry , context ) ; } ) ; } ; const serializeAws_json1_1TagResourceRequest = ( input , context ) : any => { return { ... ( input . ResourceArn !== undefined && input . ResourceArn !== null && { ResourceArn : input . ResourceArn } ) , ... ( input . Tags !== undefined && input . Tags !== null && { Tags : serializeAws_json1_1TagList ( input . Tags , context ) } ) , } ; } ; const serializeAws_json1_1TranscriptFilter = ( input , context ) : any => { return { ... ( input . AbsoluteTimeRange !== undefined && input . AbsoluteTimeRange !== null && { AbsoluteTimeRange : serializeAws_json1_1AbsoluteTimeRange ( input . AbsoluteTimeRange , context ) , } ) , ... ( input . Negate !== undefined && input . Negate !== null && { Negate : input . Negate } ) , ... ( input . ParticipantRole !== undefined && input . ParticipantRole !== null && { ParticipantRole : input . ParticipantRole } ) , ... ( input . RelativeTimeRange !== undefined && input . RelativeTimeRange !== null && { RelativeTimeRange : serializeAws_json1_1RelativeTimeRange ( input . RelativeTimeRange , context ) , } ) , ... ( input . Targets !== undefined && input . Targets !== null && { Targets : serializeAws_json1_1StringTargetList ( input . Targets , context ) } ) , ... ( input . TranscriptFilterType !== undefined && input . TranscriptFilterType !== null && { TranscriptFilterType : input . TranscriptFilterType } ) , } ; } ; const serializeAws_json1_1UntagResourceRequest = ( input , context ) : any => { return { ... ( input . ResourceArn !== undefined && input . ResourceArn !== null && { ResourceArn : input . ResourceArn } ) , ... ( input . TagKeys !== undefined && input . TagKeys !== null && { TagKeys : serializeAws_json1_1TagKeyList ( input . TagKeys , context ) } ) , } ; } ; const serializeAws_json1_1UpdateCallAnalyticsCategoryRequest = ( input , context ) : any => { return { ... ( input . CategoryName !== undefined && input . CategoryName !== null && { CategoryName : input . CategoryName } ) , ... ( input . Rules !== undefined && input . Rules !== null && { Rules : serializeAws_json1_1RuleList ( input . Rules , context ) } ) , } ; } ; const serializeAws_json1_1UpdateMedicalVocabularyRequest = ( input , context ) : any => { return { ... ( input . LanguageCode !== undefined && input . LanguageCode !== null && { LanguageCode : input . LanguageCode } ) , ... ( input . VocabularyFileUri !== undefined && input . VocabularyFileUri !== null && { VocabularyFileUri : input . VocabularyFileUri } ) , ... ( input . VocabularyName !== undefined && input . VocabularyName !== null && { VocabularyName : input . VocabularyName } ) , } ; } ; const serializeAws_json1_1UpdateVocabularyFilterRequest = ( input , context ) : any => { return { ... ( input . VocabularyFilterFileUri !== undefined && input . VocabularyFilterFileUri !== null && { VocabularyFilterFileUri : input . VocabularyFilterFileUri } ) , ... ( input . VocabularyFilterName !== undefined && input . VocabularyFilterName !== null && { VocabularyFilterName : input . VocabularyFilterName } ) , ... ( input . Words !== undefined && input . Words !== null && { Words : serializeAws_json1_1Words ( input . Words , context ) } ) , } ; } ; const serializeAws_json1_1UpdateVocabularyRequest = ( input , context ) : any => { return { ... ( input . LanguageCode !== undefined && input . LanguageCode !== null && { LanguageCode : input . LanguageCode } ) , ... ( input . Phrases !== undefined && input . Phrases !== null && { Phrases : serializeAws_json1_1Phrases ( input . Phrases , context ) } ) , ... ( input . VocabularyFileUri !== undefined && input . VocabularyFileUri !== null && { VocabularyFileUri : input . VocabularyFileUri } ) , ... ( input . VocabularyName !== undefined && input . VocabularyName !== null && { VocabularyName : input . VocabularyName } ) , } ; } ; const serializeAws_json1_1Words = ( input , context ) : any => { return input . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return entry ; } ) ; } ; const deserializeAws_json1_1AbsoluteTimeRange = ( output , context ) : AbsoluteTimeRange => { return { EndTime : __expectLong ( output . EndTime ) , First : __expectLong ( output . First ) , Last : __expectLong ( output . Last ) , StartTime : __expectLong ( output . StartTime ) , } as any ; } ; const deserializeAws_json1_1BadRequestException = ( output , context ) : BadRequestException => { return { Message : __expectString ( output . Message ) , } as any ; } ; const deserializeAws_json1_1CallAnalyticsJob = ( output , context ) : CallAnalyticsJob => { return { CallAnalyticsJobName : __expectString ( output . CallAnalyticsJobName ) , CallAnalyticsJobStatus : __expectString ( output . CallAnalyticsJobStatus ) , ChannelDefinitions : output . ChannelDefinitions !== undefined && output . ChannelDefinitions !== null ? deserializeAws_json1_1ChannelDefinitions ( output . ChannelDefinitions , context ) : undefined , CompletionTime : output . CompletionTime !== undefined && output . CompletionTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . CompletionTime ) ) ) : undefined , CreationTime : output . CreationTime !== undefined && 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 !== undefined && output . Media !== null ? deserializeAws_json1_1Media ( output . Media , context ) : undefined , MediaFormat : __expectString ( output . MediaFormat ) , MediaSampleRateHertz : __expectInt32 ( output . MediaSampleRateHertz ) , Settings : output . Settings !== undefined && output . Settings !== null ? deserializeAws_json1_1CallAnalyticsJobSettings ( output . Settings , context ) : undefined , StartTime : output . StartTime !== undefined && output . StartTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . StartTime ) ) ) : undefined , Transcript : output . Transcript !== undefined && output . Transcript !== null ? deserializeAws_json1_1Transcript ( output . Transcript , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CallAnalyticsJobSettings = ( output , context ) : CallAnalyticsJobSettings => { return { ContentRedaction : output . ContentRedaction !== undefined && output . ContentRedaction !== null ? deserializeAws_json1_1ContentRedaction ( output . ContentRedaction , context ) : undefined , LanguageIdSettings : output . LanguageIdSettings !== undefined && output . LanguageIdSettings !== null ? deserializeAws_json1_1LanguageIdSettingsMap ( output . LanguageIdSettings , context ) : undefined , LanguageModelName : __expectString ( output . LanguageModelName ) , LanguageOptions : output . LanguageOptions !== undefined && output . LanguageOptions !== null ? deserializeAws_json1_1LanguageOptions ( output . LanguageOptions , context ) : undefined , VocabularyFilterMethod : __expectString ( output . VocabularyFilterMethod ) , VocabularyFilterName : __expectString ( output . VocabularyFilterName ) , VocabularyName : __expectString ( output . VocabularyName ) , } as any ; } ; const deserializeAws_json1_1CallAnalyticsJobSummaries = ( output , context ) : CallAnalyticsJobSummary [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1CallAnalyticsJobSummary ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1CallAnalyticsJobSummary = ( output , context ) : CallAnalyticsJobSummary => { return { CallAnalyticsJobName : __expectString ( output . CallAnalyticsJobName ) , CallAnalyticsJobStatus : __expectString ( output . CallAnalyticsJobStatus ) , CompletionTime : output . CompletionTime !== undefined && output . CompletionTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . CompletionTime ) ) ) : undefined , CreationTime : output . CreationTime !== undefined && output . CreationTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . CreationTime ) ) ) : undefined , FailureReason : __expectString ( output . FailureReason ) , LanguageCode : __expectString ( output . LanguageCode ) , StartTime : output . StartTime !== undefined && output . StartTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . StartTime ) ) ) : undefined , } as any ; } ; const deserializeAws_json1_1CategoryProperties = ( output , context ) : CategoryProperties => { return { CategoryName : __expectString ( output . CategoryName ) , CreateTime : output . CreateTime !== undefined && output . CreateTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . CreateTime ) ) ) : undefined , LastUpdateTime : output . LastUpdateTime !== undefined && output . LastUpdateTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastUpdateTime ) ) ) : undefined , Rules : output . Rules !== undefined && output . Rules !== null ? deserializeAws_json1_1RuleList ( output . Rules , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CategoryPropertiesList = ( output , context ) : CategoryProperties [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1CategoryProperties ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ChannelDefinition = ( output , context ) : ChannelDefinition => { return { ChannelId : __expectInt32 ( output . ChannelId ) , ParticipantRole : __expectString ( output . ParticipantRole ) , } as any ; } ; const deserializeAws_json1_1ChannelDefinitions = ( output , context ) : ChannelDefinition [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1ChannelDefinition ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ConflictException = ( output , context ) : ConflictException => { return { Message : __expectString ( output . Message ) , } as any ; } ; const deserializeAws_json1_1ContentRedaction = ( output , context ) : ContentRedaction => { return { RedactionOutput : __expectString ( output . RedactionOutput ) , RedactionType : __expectString ( output . RedactionType ) , } as any ; } ; const deserializeAws_json1_1CreateCallAnalyticsCategoryResponse = ( output , context ) : CreateCallAnalyticsCategoryResponse => { return { CategoryProperties : output . CategoryProperties !== undefined && output . CategoryProperties !== null ? deserializeAws_json1_1CategoryProperties ( output . CategoryProperties , context ) : undefined , } as any ; } ; const deserializeAws_json1_1CreateLanguageModelResponse = ( output , context ) : CreateLanguageModelResponse => { return { BaseModelName : __expectString ( output . BaseModelName ) , InputDataConfig : output . InputDataConfig !== undefined && output . InputDataConfig !== null ? deserializeAws_json1_1InputDataConfig ( output . InputDataConfig , context ) : undefined , LanguageCode : __expectString ( output . LanguageCode ) , ModelName : __expectString ( output . ModelName ) , ModelStatus : __expectString ( output . ModelStatus ) , } as any ; } ; const deserializeAws_json1_1CreateMedicalVocabularyResponse = ( output , context ) : CreateMedicalVocabularyResponse => { return { FailureReason : __expectString ( output . FailureReason ) , LanguageCode : __expectString ( output . LanguageCode ) , LastModifiedTime : output . LastModifiedTime !== undefined && output . LastModifiedTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastModifiedTime ) ) ) : undefined , VocabularyName : __expectString ( output . VocabularyName ) , VocabularyState : __expectString ( output . VocabularyState ) , } as any ; } ; const deserializeAws_json1_1CreateVocabularyFilterResponse = ( output , context ) : CreateVocabularyFilterResponse => { return { LanguageCode : __expectString ( output . LanguageCode ) , LastModifiedTime : output . LastModifiedTime !== undefined && output . LastModifiedTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastModifiedTime ) ) ) : undefined , VocabularyFilterName : __expectString ( output . VocabularyFilterName ) , } as any ; } ; const deserializeAws_json1_1CreateVocabularyResponse = ( output , context ) : CreateVocabularyResponse => { return { FailureReason : __expectString ( output . FailureReason ) , LanguageCode : __expectString ( output . LanguageCode ) , LastModifiedTime : output . LastModifiedTime !== undefined && output . LastModifiedTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastModifiedTime ) ) ) : undefined , VocabularyName : __expectString ( output . VocabularyName ) , VocabularyState : __expectString ( output . VocabularyState ) , } as any ; } ; const deserializeAws_json1_1DeleteCallAnalyticsCategoryResponse = ( output , context ) : DeleteCallAnalyticsCategoryResponse => { return { } as any ; } ; const deserializeAws_json1_1DeleteCallAnalyticsJobResponse = ( output , context ) : DeleteCallAnalyticsJobResponse => { return { } as any ; } ; const deserializeAws_json1_1DescribeLanguageModelResponse = ( output , context ) : DescribeLanguageModelResponse => { return { LanguageModel : output . LanguageModel !== undefined && output . LanguageModel !== null ? deserializeAws_json1_1LanguageModel ( output . LanguageModel , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetCallAnalyticsCategoryResponse = ( output , context ) : GetCallAnalyticsCategoryResponse => { return { CategoryProperties : output . CategoryProperties !== undefined && output . CategoryProperties !== null ? deserializeAws_json1_1CategoryProperties ( output . CategoryProperties , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetCallAnalyticsJobResponse = ( output , context ) : GetCallAnalyticsJobResponse => { return { CallAnalyticsJob : output . CallAnalyticsJob !== undefined && output . CallAnalyticsJob !== null ? deserializeAws_json1_1CallAnalyticsJob ( output . CallAnalyticsJob , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetMedicalTranscriptionJobResponse = ( output , context ) : GetMedicalTranscriptionJobResponse => { return { MedicalTranscriptionJob : output . MedicalTranscriptionJob !== undefined && output . MedicalTranscriptionJob !== null ? deserializeAws_json1_1MedicalTranscriptionJob ( output . MedicalTranscriptionJob , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetMedicalVocabularyResponse = ( output , context ) : GetMedicalVocabularyResponse => { return { DownloadUri : __expectString ( output . DownloadUri ) , FailureReason : __expectString ( output . FailureReason ) , LanguageCode : __expectString ( output . LanguageCode ) , LastModifiedTime : output . LastModifiedTime !== undefined && output . LastModifiedTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastModifiedTime ) ) ) : undefined , VocabularyName : __expectString ( output . VocabularyName ) , VocabularyState : __expectString ( output . VocabularyState ) , } as any ; } ; const deserializeAws_json1_1GetTranscriptionJobResponse = ( output , context ) : GetTranscriptionJobResponse => { return { TranscriptionJob : output . TranscriptionJob !== undefined && output . TranscriptionJob !== null ? deserializeAws_json1_1TranscriptionJob ( output . TranscriptionJob , context ) : undefined , } as any ; } ; const deserializeAws_json1_1GetVocabularyFilterResponse = ( output , context ) : GetVocabularyFilterResponse => { return { DownloadUri : __expectString ( output . DownloadUri ) , LanguageCode : __expectString ( output . LanguageCode ) , LastModifiedTime : output . LastModifiedTime !== undefined && output . LastModifiedTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastModifiedTime ) ) ) : undefined , VocabularyFilterName : __expectString ( output . VocabularyFilterName ) , } as any ; } ; const deserializeAws_json1_1GetVocabularyResponse = ( output , context ) : GetVocabularyResponse => { return { DownloadUri : __expectString ( output . DownloadUri ) , FailureReason : __expectString ( output . FailureReason ) , LanguageCode : __expectString ( output . LanguageCode ) , LastModifiedTime : output . LastModifiedTime !== undefined && output . LastModifiedTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastModifiedTime ) ) ) : undefined , VocabularyName : __expectString ( output . VocabularyName ) , VocabularyState : __expectString ( output . VocabularyState ) , } as any ; } ; const deserializeAws_json1_1InputDataConfig = ( output , context ) : InputDataConfig => { return { DataAccessRoleArn : __expectString ( output . DataAccessRoleArn ) , S3Uri : __expectString ( output . S3Uri ) , TuningDataS3Uri : __expectString ( output . TuningDataS3Uri ) , } as any ; } ; const deserializeAws_json1_1InternalFailureException = ( output , context ) : InternalFailureException => { return { Message : __expectString ( output . Message ) , } as any ; } ; const deserializeAws_json1_1InterruptionFilter = ( output , context ) : InterruptionFilter => { return { AbsoluteTimeRange : output . AbsoluteTimeRange !== undefined && output . AbsoluteTimeRange !== null ? deserializeAws_json1_1AbsoluteTimeRange ( output . AbsoluteTimeRange , context ) : undefined , Negate : __expectBoolean ( output . Negate ) , ParticipantRole : __expectString ( output . ParticipantRole ) , RelativeTimeRange : output . RelativeTimeRange !== undefined && output . RelativeTimeRange !== null ? deserializeAws_json1_1RelativeTimeRange ( output . RelativeTimeRange , context ) : undefined , Threshold : __expectLong ( output . Threshold ) , } as any ; } ; const deserializeAws_json1_1JobExecutionSettings = ( output , context ) : JobExecutionSettings => { return { AllowDeferredExecution : __expectBoolean ( output . AllowDeferredExecution ) , DataAccessRoleArn : __expectString ( output . DataAccessRoleArn ) , } as any ; } ; const deserializeAws_json1_1LanguageIdSettings = ( output , context ) : LanguageIdSettings => { return { LanguageModelName : __expectString ( output . LanguageModelName ) , VocabularyFilterName : __expectString ( output . VocabularyFilterName ) , VocabularyName : __expectString ( output . VocabularyName ) , } as any ; } ; const deserializeAws_json1_1LanguageIdSettingsMap = ( output , context ) : { [ key ] : LanguageIdSettings ; } => { return Object . entries ( output ) . reduce ( ( acc , [ key , value ] ) => { if ( value === null ) { return acc ; } return { ... acc , [ key ] : deserializeAws_json1_1LanguageIdSettings ( value , context ) , } ; } , { } ) ; } ; const deserializeAws_json1_1LanguageModel = ( output , context ) : LanguageModel => { return { BaseModelName : __expectString ( output . BaseModelName ) , CreateTime : output . CreateTime !== undefined && output . CreateTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . CreateTime ) ) ) : undefined , FailureReason : __expectString ( output . FailureReason ) , InputDataConfig : output . InputDataConfig !== undefined && output . InputDataConfig !== null ? deserializeAws_json1_1InputDataConfig ( output . InputDataConfig , context ) : undefined , LanguageCode : __expectString ( output . LanguageCode ) , LastModifiedTime : output . LastModifiedTime !== undefined && output . LastModifiedTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastModifiedTime ) ) ) : undefined , ModelName : __expectString ( output . ModelName ) , ModelStatus : __expectString ( output . ModelStatus ) , UpgradeAvailability : __expectBoolean ( output . UpgradeAvailability ) , } as any ; } ; const deserializeAws_json1_1LanguageOptions = ( output , context ) : ( LanguageCode | string ) [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_json1_1LimitExceededException = ( output , context ) : LimitExceededException => { return { Message : __expectString ( output . Message ) , } as any ; } ; const deserializeAws_json1_1ListCallAnalyticsCategoriesResponse = ( output , context ) : ListCallAnalyticsCategoriesResponse => { return { Categories : output . Categories !== undefined && output . Categories !== null ? deserializeAws_json1_1CategoryPropertiesList ( output . Categories , context ) : undefined , NextToken : __expectString ( output . NextToken ) , } as any ; } ; const deserializeAws_json1_1ListCallAnalyticsJobsResponse = ( output , context ) : ListCallAnalyticsJobsResponse => { return { CallAnalyticsJobSummaries : output . CallAnalyticsJobSummaries !== undefined && output . CallAnalyticsJobSummaries !== null ? deserializeAws_json1_1CallAnalyticsJobSummaries ( output . CallAnalyticsJobSummaries , context ) : undefined , NextToken : __expectString ( output . NextToken ) , Status : __expectString ( output . Status ) , } as any ; } ; const deserializeAws_json1_1ListLanguageModelsResponse = ( output , context ) : ListLanguageModelsResponse => { return { Models : output . Models !== undefined && output . Models !== null ? deserializeAws_json1_1Models ( output . Models , context ) : undefined , NextToken : __expectString ( output . NextToken ) , } as any ; } ; const deserializeAws_json1_1ListMedicalTranscriptionJobsResponse = ( output , context ) : ListMedicalTranscriptionJobsResponse => { return { MedicalTranscriptionJobSummaries : output . MedicalTranscriptionJobSummaries !== undefined && output . MedicalTranscriptionJobSummaries !== null ? deserializeAws_json1_1MedicalTranscriptionJobSummaries ( output . MedicalTranscriptionJobSummaries , context ) : undefined , NextToken : __expectString ( output . NextToken ) , Status : __expectString ( output . Status ) , } as any ; } ; const deserializeAws_json1_1ListMedicalVocabulariesResponse = ( output , context ) : ListMedicalVocabulariesResponse => { return { NextToken : __expectString ( output . NextToken ) , Status : __expectString ( output . Status ) , Vocabularies : output . Vocabularies !== undefined && output . Vocabularies !== null ? deserializeAws_json1_1Vocabularies ( output . Vocabularies , context ) : undefined , } as any ; } ; const deserializeAws_json1_1ListTagsForResourceResponse = ( output , context ) : ListTagsForResourceResponse => { return { ResourceArn : __expectString ( output . ResourceArn ) , Tags : output . Tags !== undefined && output . Tags !== null ? deserializeAws_json1_1TagList ( output . Tags , context ) : undefined , } as any ; } ; const deserializeAws_json1_1ListTranscriptionJobsResponse = ( output , context ) : ListTranscriptionJobsResponse => { return { NextToken : __expectString ( output . NextToken ) , Status : __expectString ( output . Status ) , TranscriptionJobSummaries : output . TranscriptionJobSummaries !== undefined && output . TranscriptionJobSummaries !== null ? deserializeAws_json1_1TranscriptionJobSummaries ( output . TranscriptionJobSummaries , context ) : undefined , } as any ; } ; const deserializeAws_json1_1ListVocabulariesResponse = ( output , context ) : ListVocabulariesResponse => { return { NextToken : __expectString ( output . NextToken ) , Status : __expectString ( output . Status ) , Vocabularies : output . Vocabularies !== undefined && output . Vocabularies !== null ? deserializeAws_json1_1Vocabularies ( output . Vocabularies , context ) : undefined , } as any ; } ; const deserializeAws_json1_1ListVocabularyFiltersResponse = ( output , context ) : ListVocabularyFiltersResponse => { return { NextToken : __expectString ( output . NextToken ) , VocabularyFilters : output . VocabularyFilters !== undefined && output . VocabularyFilters !== null ? deserializeAws_json1_1VocabularyFilters ( output . VocabularyFilters , context ) : undefined , } as any ; } ; const deserializeAws_json1_1Media = ( output , context ) : Media => { return { MediaFileUri : __expectString ( output . MediaFileUri ) , RedactedMediaFileUri : __expectString ( output . RedactedMediaFileUri ) , } as any ; } ; const deserializeAws_json1_1MedicalTranscript = ( output , context ) : MedicalTranscript => { return { TranscriptFileUri : __expectString ( output . TranscriptFileUri ) , } as any ; } ; const deserializeAws_json1_1MedicalTranscriptionJob = ( output , context ) : MedicalTranscriptionJob => { return { CompletionTime : output . CompletionTime !== undefined && output . CompletionTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . CompletionTime ) ) ) : undefined , ContentIdentificationType : __expectString ( output . ContentIdentificationType ) , CreationTime : output . CreationTime !== undefined && output . CreationTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . CreationTime ) ) ) : undefined , FailureReason : __expectString ( output . FailureReason ) , LanguageCode : __expectString ( output . LanguageCode ) , Media : output . Media !== undefined && output . Media !== null ? deserializeAws_json1_1Media ( output . Media , context ) : undefined , MediaFormat : __expectString ( output . MediaFormat ) , MediaSampleRateHertz : __expectInt32 ( output . MediaSampleRateHertz ) , MedicalTranscriptionJobName : __expectString ( output . MedicalTranscriptionJobName ) , Settings : output . Settings !== undefined && output . Settings !== null ? deserializeAws_json1_1MedicalTranscriptionSetting ( output . Settings , context ) : undefined , Specialty : __expectString ( output . Specialty ) , StartTime : output . StartTime !== undefined && output . StartTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . StartTime ) ) ) : undefined , Tags : output . Tags !== undefined && output . Tags !== null ? deserializeAws_json1_1TagList ( output . Tags , context ) : undefined , Transcript : output . Transcript !== undefined && output . Transcript !== null ? deserializeAws_json1_1MedicalTranscript ( output . Transcript , context ) : undefined , TranscriptionJobStatus : __expectString ( output . TranscriptionJobStatus ) , Type : __expectString ( output . Type ) , } as any ; } ; const deserializeAws_json1_1MedicalTranscriptionJobSummaries = ( output , context ) : MedicalTranscriptionJobSummary [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1MedicalTranscriptionJobSummary ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1MedicalTranscriptionJobSummary = ( output , context ) : MedicalTranscriptionJobSummary => { return { CompletionTime : output . CompletionTime !== undefined && output . CompletionTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . CompletionTime ) ) ) : undefined , ContentIdentificationType : __expectString ( output . ContentIdentificationType ) , CreationTime : output . CreationTime !== undefined && 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 !== undefined && output . StartTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . StartTime ) ) ) : undefined , TranscriptionJobStatus : __expectString ( output . TranscriptionJobStatus ) , Type : __expectString ( output . Type ) , } as any ; } ; const deserializeAws_json1_1MedicalTranscriptionSetting = ( output , context ) : 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 ; } ; const deserializeAws_json1_1Models = ( output , context ) : LanguageModel [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1LanguageModel ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1ModelSettings = ( output , context ) : ModelSettings => { return { LanguageModelName : __expectString ( output . LanguageModelName ) , } as any ; } ; const deserializeAws_json1_1NonTalkTimeFilter = ( output , context ) : NonTalkTimeFilter => { return { AbsoluteTimeRange : output . AbsoluteTimeRange !== undefined && output . AbsoluteTimeRange !== null ? deserializeAws_json1_1AbsoluteTimeRange ( output . AbsoluteTimeRange , context ) : undefined , Negate : __expectBoolean ( output . Negate ) , RelativeTimeRange : output . RelativeTimeRange !== undefined && output . RelativeTimeRange !== null ? deserializeAws_json1_1RelativeTimeRange ( output . RelativeTimeRange , context ) : undefined , Threshold : __expectLong ( output . Threshold ) , } as any ; } ; const deserializeAws_json1_1NotFoundException = ( output , context ) : NotFoundException => { return { Message : __expectString ( output . Message ) , } as any ; } ; const deserializeAws_json1_1RelativeTimeRange = ( output , context ) : RelativeTimeRange => { return { EndPercentage : __expectInt32 ( output . EndPercentage ) , First : __expectInt32 ( output . First ) , Last : __expectInt32 ( output . Last ) , StartPercentage : __expectInt32 ( output . StartPercentage ) , } as any ; } ; const deserializeAws_json1_1Rule = ( output , context ) : Rule => { if ( output . InterruptionFilter !== undefined && output . InterruptionFilter !== null ) { return { InterruptionFilter : deserializeAws_json1_1InterruptionFilter ( output . InterruptionFilter , context ) , } ; } if ( output . NonTalkTimeFilter !== undefined && output . NonTalkTimeFilter !== null ) { return { NonTalkTimeFilter : deserializeAws_json1_1NonTalkTimeFilter ( output . NonTalkTimeFilter , context ) , } ; } if ( output . SentimentFilter !== undefined && output . SentimentFilter !== null ) { return { SentimentFilter : deserializeAws_json1_1SentimentFilter ( output . SentimentFilter , context ) , } ; } if ( output . TranscriptFilter !== undefined && output . TranscriptFilter !== null ) { return { TranscriptFilter : deserializeAws_json1_1TranscriptFilter ( output . TranscriptFilter , context ) , } ; } return { $unknown : Object . entries ( output ) [ 0 ] } ; } ; const deserializeAws_json1_1RuleList = ( output , context ) : Rule [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1Rule ( __expectUnion ( entry ) , context ) ; } ) ; } ; const deserializeAws_json1_1SentimentFilter = ( output , context ) : SentimentFilter => { return { AbsoluteTimeRange : output . AbsoluteTimeRange !== undefined && output . AbsoluteTimeRange !== null ? deserializeAws_json1_1AbsoluteTimeRange ( output . AbsoluteTimeRange , context ) : undefined , Negate : __expectBoolean ( output . Negate ) , ParticipantRole : __expectString ( output . ParticipantRole ) , RelativeTimeRange : output . RelativeTimeRange !== undefined && output . RelativeTimeRange !== null ? deserializeAws_json1_1RelativeTimeRange ( output . RelativeTimeRange , context ) : undefined , Sentiments : output . Sentiments !== undefined && output . Sentiments !== null ? deserializeAws_json1_1SentimentValueList ( output . Sentiments , context ) : undefined , } as any ; } ; const deserializeAws_json1_1SentimentValueList = ( output , context ) : ( SentimentValue | string ) [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_json1_1Settings = ( output , context ) : 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 ; } ; const deserializeAws_json1_1StartCallAnalyticsJobResponse = ( output , context ) : StartCallAnalyticsJobResponse => { return { CallAnalyticsJob : output . CallAnalyticsJob !== undefined && output . CallAnalyticsJob !== null ? deserializeAws_json1_1CallAnalyticsJob ( output . CallAnalyticsJob , context ) : undefined , } as any ; } ; const deserializeAws_json1_1StartMedicalTranscriptionJobResponse = ( output , context ) : StartMedicalTranscriptionJobResponse => { return { MedicalTranscriptionJob : output . MedicalTranscriptionJob !== undefined && output . MedicalTranscriptionJob !== null ? deserializeAws_json1_1MedicalTranscriptionJob ( output . MedicalTranscriptionJob , context ) : undefined , } as any ; } ; const deserializeAws_json1_1StartTranscriptionJobResponse = ( output , context ) : StartTranscriptionJobResponse => { return { TranscriptionJob : output . TranscriptionJob !== undefined && output . TranscriptionJob !== null ? deserializeAws_json1_1TranscriptionJob ( output . TranscriptionJob , context ) : undefined , } as any ; } ; const deserializeAws_json1_1StringTargetList = ( output , context ) : string [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_json1_1SubtitleFileUris = ( output , context ) : string [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_json1_1SubtitleFormats = ( output , context ) : ( SubtitleFormat | string ) [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return __expectString ( entry ) as any ; } ) ; } ; const deserializeAws_json1_1SubtitlesOutput = ( output , context ) : SubtitlesOutput => { return { Formats : output . Formats !== undefined && output . Formats !== null ? deserializeAws_json1_1SubtitleFormats ( output . Formats , context ) : undefined , SubtitleFileUris : output . SubtitleFileUris !== undefined && output . SubtitleFileUris !== null ? deserializeAws_json1_1SubtitleFileUris ( output . SubtitleFileUris , context ) : undefined , } as any ; } ; const deserializeAws_json1_1Tag = ( output , context ) : Tag => { return { Key : __expectString ( output . Key ) , Value : __expectString ( output . Value ) , } as any ; } ; const deserializeAws_json1_1TagList = ( output , context ) : Tag [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1Tag ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1TagResourceResponse = ( output , context ) : TagResourceResponse => { return { } as any ; } ; const deserializeAws_json1_1Transcript = ( output , context ) : Transcript => { return { RedactedTranscriptFileUri : __expectString ( output . RedactedTranscriptFileUri ) , TranscriptFileUri : __expectString ( output . TranscriptFileUri ) , } as any ; } ; const deserializeAws_json1_1TranscriptFilter = ( output , context ) : TranscriptFilter => { return { AbsoluteTimeRange : output . AbsoluteTimeRange !== undefined && output . AbsoluteTimeRange !== null ? deserializeAws_json1_1AbsoluteTimeRange ( output . AbsoluteTimeRange , context ) : undefined , Negate : __expectBoolean ( output . Negate ) , ParticipantRole : __expectString ( output . ParticipantRole ) , RelativeTimeRange : output . RelativeTimeRange !== undefined && output . RelativeTimeRange !== null ? deserializeAws_json1_1RelativeTimeRange ( output . RelativeTimeRange , context ) : undefined , Targets : output . Targets !== undefined && output . Targets !== null ? deserializeAws_json1_1StringTargetList ( output . Targets , context ) : undefined , TranscriptFilterType : __expectString ( output . TranscriptFilterType ) , } as any ; } ; const deserializeAws_json1_1TranscriptionJob = ( output , context ) : TranscriptionJob => { return { CompletionTime : output . CompletionTime !== undefined && output . CompletionTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . CompletionTime ) ) ) : undefined , ContentRedaction : output . ContentRedaction !== undefined && output . ContentRedaction !== null ? deserializeAws_json1_1ContentRedaction ( output . ContentRedaction , context ) : undefined , CreationTime : output . CreationTime !== undefined && output . CreationTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . CreationTime ) ) ) : undefined , FailureReason : __expectString ( output . FailureReason ) , IdentifiedLanguageScore : __limitedParseFloat32 ( output . IdentifiedLanguageScore ) , IdentifyLanguage : __expectBoolean ( output . IdentifyLanguage ) , JobExecutionSettings : output . JobExecutionSettings !== undefined && output . JobExecutionSettings !== null ? deserializeAws_json1_1JobExecutionSettings ( output . JobExecutionSettings , context ) : undefined , LanguageCode : __expectString ( output . LanguageCode ) , LanguageIdSettings : output . LanguageIdSettings !== undefined && output . LanguageIdSettings !== null ? deserializeAws_json1_1LanguageIdSettingsMap ( output . LanguageIdSettings , context ) : undefined , LanguageOptions : output . LanguageOptions !== undefined && output . LanguageOptions !== null ? deserializeAws_json1_1LanguageOptions ( output . LanguageOptions , context ) : undefined , Media : output . Media !== undefined && output . Media !== null ? deserializeAws_json1_1Media ( output . Media , context ) : undefined , MediaFormat : __expectString ( output . MediaFormat ) , MediaSampleRateHertz : __expectInt32 ( output . MediaSampleRateHertz ) , ModelSettings : output . ModelSettings !== undefined && output . ModelSettings !== null ? deserializeAws_json1_1ModelSettings ( output . ModelSettings , context ) : undefined , Settings : output . Settings !== undefined && output . Settings !== null ? deserializeAws_json1_1Settings ( output . Settings , context ) : undefined , StartTime : output . StartTime !== undefined && output . StartTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . StartTime ) ) ) : undefined , Subtitles : output . Subtitles !== undefined && output . Subtitles !== null ? deserializeAws_json1_1SubtitlesOutput ( output . Subtitles , context ) : undefined , Tags : output . Tags !== undefined && output . Tags !== null ? deserializeAws_json1_1TagList ( output . Tags , context ) : undefined , Transcript : output . Transcript !== undefined && output . Transcript !== null ? deserializeAws_json1_1Transcript ( output . Transcript , context ) : undefined , TranscriptionJobName : __expectString ( output . TranscriptionJobName ) , TranscriptionJobStatus : __expectString ( output . TranscriptionJobStatus ) , } as any ; } ; const deserializeAws_json1_1TranscriptionJobSummaries = ( output , context ) : TranscriptionJobSummary [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1TranscriptionJobSummary ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1TranscriptionJobSummary = ( output , context ) : TranscriptionJobSummary => { return { CompletionTime : output . CompletionTime !== undefined && output . CompletionTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . CompletionTime ) ) ) : undefined , ContentRedaction : output . ContentRedaction !== undefined && output . ContentRedaction !== null ? deserializeAws_json1_1ContentRedaction ( output . ContentRedaction , context ) : undefined , CreationTime : output . CreationTime !== undefined && output . CreationTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . CreationTime ) ) ) : undefined , FailureReason : __expectString ( output . FailureReason ) , IdentifiedLanguageScore : __limitedParseFloat32 ( output . IdentifiedLanguageScore ) , IdentifyLanguage : __expectBoolean ( output . IdentifyLanguage ) , LanguageCode : __expectString ( output . LanguageCode ) , ModelSettings : output . ModelSettings !== undefined && output . ModelSettings !== null ? deserializeAws_json1_1ModelSettings ( output . ModelSettings , context ) : undefined , OutputLocationType : __expectString ( output . OutputLocationType ) , StartTime : output . StartTime !== undefined && output . StartTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . StartTime ) ) ) : undefined , TranscriptionJobName : __expectString ( output . TranscriptionJobName ) , TranscriptionJobStatus : __expectString ( output . TranscriptionJobStatus ) , } as any ; } ; const deserializeAws_json1_1UntagResourceResponse = ( output , context ) : UntagResourceResponse => { return { } as any ; } ; const deserializeAws_json1_1UpdateCallAnalyticsCategoryResponse = ( output , context ) : UpdateCallAnalyticsCategoryResponse => { return { CategoryProperties : output . CategoryProperties !== undefined && output . CategoryProperties !== null ? deserializeAws_json1_1CategoryProperties ( output . CategoryProperties , context ) : undefined , } as any ; } ; const deserializeAws_json1_1UpdateMedicalVocabularyResponse = ( output , context ) : UpdateMedicalVocabularyResponse => { return { LanguageCode : __expectString ( output . LanguageCode ) , LastModifiedTime : output . LastModifiedTime !== undefined && output . LastModifiedTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastModifiedTime ) ) ) : undefined , VocabularyName : __expectString ( output . VocabularyName ) , VocabularyState : __expectString ( output . VocabularyState ) , } as any ; } ; const deserializeAws_json1_1UpdateVocabularyFilterResponse = ( output , context ) : UpdateVocabularyFilterResponse => { return { LanguageCode : __expectString ( output . LanguageCode ) , LastModifiedTime : output . LastModifiedTime !== undefined && output . LastModifiedTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastModifiedTime ) ) ) : undefined , VocabularyFilterName : __expectString ( output . VocabularyFilterName ) , } as any ; } ; const deserializeAws_json1_1UpdateVocabularyResponse = ( output , context ) : UpdateVocabularyResponse => { return { LanguageCode : __expectString ( output . LanguageCode ) , LastModifiedTime : output . LastModifiedTime !== undefined && output . LastModifiedTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastModifiedTime ) ) ) : undefined , VocabularyName : __expectString ( output . VocabularyName ) , VocabularyState : __expectString ( output . VocabularyState ) , } as any ; } ; const deserializeAws_json1_1Vocabularies = ( output , context ) : VocabularyInfo [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1VocabularyInfo ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1VocabularyFilterInfo = ( output , context ) : VocabularyFilterInfo => { return { LanguageCode : __expectString ( output . LanguageCode ) , LastModifiedTime : output . LastModifiedTime !== undefined && output . LastModifiedTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastModifiedTime ) ) ) : undefined , VocabularyFilterName : __expectString ( output . VocabularyFilterName ) , } as any ; } ; const deserializeAws_json1_1VocabularyFilters = ( output , context ) : VocabularyFilterInfo [ ] => { return ( output || [ ] ) . filter ( ( e ) => e != null ) . map ( ( entry ) => { if ( entry === null ) { return null as any ; } return deserializeAws_json1_1VocabularyFilterInfo ( entry , context ) ; } ) ; } ; const deserializeAws_json1_1VocabularyInfo = ( output , context ) : VocabularyInfo => { return { LanguageCode : __expectString ( output . LanguageCode ) , LastModifiedTime : output . LastModifiedTime !== undefined && output . LastModifiedTime !== null ? __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( output . LastModifiedTime ) ) ) : undefined , VocabularyName : __expectString ( output . VocabularyName ) , VocabularyState : __expectString ( output . VocabularyState ) , } as any ; } ; const deserializeMetadata = ( output ) : __ResponseMetadata => ( { httpStatusCode : output . statusCode , requestId : output . headers [ "x-amzn-requestid" ] ?? output . headers [ "x-amzn-request-id" ] , extendedRequestId : output . headers [ "x-amz-id-2" ] , cfId : output . headers [ "x-amz-cf-id" ] , } ) ; const collectBody = ( streamBody = new Uint8Array ( ) , context ) : Promise < Uint8Array > => { if ( streamBody instanceof Uint8Array ) { return Promise . resolve ( streamBody ) ; } return context . streamCollector ( streamBody ) || Promise . resolve ( new Uint8Array ( ) ) ; } ; const collectBodyString = ( streamBody , context ) : Promise < string > => collectBody ( streamBody , context ) . then ( ( body ) => context . utf8Encoder ( body ) ) ; const buildHttpRpcRequest = async ( context , headers , path , resolvedHostname , body ) : Promise < __HttpRequest > => { const { hostname , protocol = "https" , port , path : basePath } = await context . endpoint ( ) ; const contents = { protocol , hostname , port , method : "POST" , path : basePath . endsWith ( "/" ) ? basePath . slice ( 0 , - 1 ) + path : basePath + path , headers , } ; if ( resolvedHostname !== undefined ) { contents . hostname = resolvedHostname ; } if ( body !== undefined ) { contents . body = body ; } return new __HttpRequest ( contents ) ; } ; const parseBody = ( streamBody , context ) : any => collectBodyString ( streamBody , context ) . then ( ( encoded ) => { if ( encoded . length ) { return JSON . parse ( encoded ) ; } return { } ; } ) ; /**
 * Load an error code for the aws.rest-json-1.1 protocol.
 */ const loadRestJsonErrorCode = ( output , data ) : string => { const findKey = ( object , key ) => Object . keys ( object ) . find ( ( k ) => k . toLowerCase ( ) === key . toLowerCase ( ) ) ; const sanitizeErrorCode = ( rawValue ) : string => { let cleanValue = rawValue ; if ( cleanValue . indexOf ( ":" ) >= 0 ) { cleanValue = cleanValue . split ( ":" ) [ 0 ] ; } if ( cleanValue . indexOf ( "#" ) >= 0 ) { cleanValue = cleanValue . split ( "#" ) [ 1 ] ; } return cleanValue ; } ; const headerKey = findKey ( output . headers , "x-amzn-errortype" ) ; if ( headerKey !== undefined ) { return sanitizeErrorCode ( output . headers [ headerKey ] ) ; } if ( data . code !== undefined ) { return sanitizeErrorCode ( data . code ) ; } if ( data [ "__type" ] !== undefined ) { return sanitizeErrorCode ( data [ "__type" ] ) ; } return "" ; } ;