@aws-sdk/client-voice-id 3.35.0 → 3.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist-cjs/VoiceID.js +0 -1
- package/dist-cjs/VoiceIDClient.js +0 -1
- package/dist-cjs/commands/CreateDomainCommand.js +0 -1
- package/dist-cjs/commands/DeleteDomainCommand.js +0 -1
- package/dist-cjs/commands/DeleteFraudsterCommand.js +0 -1
- package/dist-cjs/commands/DeleteSpeakerCommand.js +0 -1
- package/dist-cjs/commands/DescribeDomainCommand.js +0 -1
- package/dist-cjs/commands/DescribeFraudsterCommand.js +0 -1
- package/dist-cjs/commands/DescribeFraudsterRegistrationJobCommand.js +0 -1
- package/dist-cjs/commands/DescribeSpeakerCommand.js +0 -1
- package/dist-cjs/commands/DescribeSpeakerEnrollmentJobCommand.js +0 -1
- package/dist-cjs/commands/EvaluateSessionCommand.js +0 -1
- package/dist-cjs/commands/ListDomainsCommand.js +0 -1
- package/dist-cjs/commands/ListFraudsterRegistrationJobsCommand.js +0 -1
- package/dist-cjs/commands/ListSpeakerEnrollmentJobsCommand.js +0 -1
- package/dist-cjs/commands/ListSpeakersCommand.js +0 -1
- package/dist-cjs/commands/ListTagsForResourceCommand.js +0 -1
- package/dist-cjs/commands/OptOutSpeakerCommand.js +0 -1
- package/dist-cjs/commands/StartFraudsterRegistrationJobCommand.js +0 -1
- package/dist-cjs/commands/StartSpeakerEnrollmentJobCommand.js +0 -1
- package/dist-cjs/commands/TagResourceCommand.js +0 -1
- package/dist-cjs/commands/UntagResourceCommand.js +0 -1
- package/dist-cjs/commands/UpdateDomainCommand.js +0 -1
- package/dist-cjs/endpoints.js +0 -1
- package/dist-cjs/index.js +0 -1
- package/dist-cjs/models/index.js +0 -1
- package/dist-cjs/models/models_0.js +0 -1
- package/dist-cjs/pagination/Interfaces.js +0 -1
- package/dist-cjs/pagination/ListDomainsPaginator.js +0 -1
- package/dist-cjs/pagination/ListFraudsterRegistrationJobsPaginator.js +0 -1
- package/dist-cjs/pagination/ListSpeakerEnrollmentJobsPaginator.js +0 -1
- package/dist-cjs/pagination/ListSpeakersPaginator.js +0 -1
- package/dist-cjs/protocols/Aws_json1_0.js +0 -1
- package/dist-cjs/runtimeConfig.browser.js +2 -3
- package/dist-cjs/runtimeConfig.js +3 -4
- package/dist-cjs/runtimeConfig.native.js +0 -1
- package/dist-cjs/runtimeConfig.shared.js +0 -1
- package/dist-es/VoiceID.js +0 -1
- package/dist-es/VoiceIDClient.js +0 -1
- package/dist-es/commands/CreateDomainCommand.js +0 -1
- package/dist-es/commands/DeleteDomainCommand.js +0 -1
- package/dist-es/commands/DeleteFraudsterCommand.js +0 -1
- package/dist-es/commands/DeleteSpeakerCommand.js +0 -1
- package/dist-es/commands/DescribeDomainCommand.js +0 -1
- package/dist-es/commands/DescribeFraudsterCommand.js +0 -1
- package/dist-es/commands/DescribeFraudsterRegistrationJobCommand.js +0 -1
- package/dist-es/commands/DescribeSpeakerCommand.js +0 -1
- package/dist-es/commands/DescribeSpeakerEnrollmentJobCommand.js +0 -1
- package/dist-es/commands/EvaluateSessionCommand.js +0 -1
- package/dist-es/commands/ListDomainsCommand.js +0 -1
- package/dist-es/commands/ListFraudsterRegistrationJobsCommand.js +0 -1
- package/dist-es/commands/ListSpeakerEnrollmentJobsCommand.js +0 -1
- package/dist-es/commands/ListSpeakersCommand.js +0 -1
- package/dist-es/commands/ListTagsForResourceCommand.js +0 -1
- package/dist-es/commands/OptOutSpeakerCommand.js +0 -1
- package/dist-es/commands/StartFraudsterRegistrationJobCommand.js +0 -1
- package/dist-es/commands/StartSpeakerEnrollmentJobCommand.js +0 -1
- package/dist-es/commands/TagResourceCommand.js +0 -1
- package/dist-es/commands/UntagResourceCommand.js +0 -1
- package/dist-es/commands/UpdateDomainCommand.js +0 -1
- package/dist-es/endpoints.js +0 -1
- package/dist-es/index.js +0 -1
- package/dist-es/models/index.js +0 -1
- package/dist-es/models/models_0.js +0 -1
- package/dist-es/pagination/Interfaces.js +0 -1
- package/dist-es/pagination/ListDomainsPaginator.js +0 -1
- package/dist-es/pagination/ListFraudsterRegistrationJobsPaginator.js +0 -1
- package/dist-es/pagination/ListSpeakerEnrollmentJobsPaginator.js +0 -1
- package/dist-es/pagination/ListSpeakersPaginator.js +0 -1
- package/dist-es/protocols/Aws_json1_0.js +0 -1
- package/dist-es/runtimeConfig.browser.js +1 -2
- package/dist-es/runtimeConfig.js +2 -3
- package/dist-es/runtimeConfig.native.js +0 -1
- package/dist-es/runtimeConfig.shared.js +0 -1
- package/package.json +33 -30
- package/dist-cjs/VoiceID.js.map +0 -1
- package/dist-cjs/VoiceIDClient.js.map +0 -1
- package/dist-cjs/commands/CreateDomainCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteDomainCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteFraudsterCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteSpeakerCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeDomainCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeFraudsterCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeFraudsterRegistrationJobCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeSpeakerCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeSpeakerEnrollmentJobCommand.js.map +0 -1
- package/dist-cjs/commands/EvaluateSessionCommand.js.map +0 -1
- package/dist-cjs/commands/ListDomainsCommand.js.map +0 -1
- package/dist-cjs/commands/ListFraudsterRegistrationJobsCommand.js.map +0 -1
- package/dist-cjs/commands/ListSpeakerEnrollmentJobsCommand.js.map +0 -1
- package/dist-cjs/commands/ListSpeakersCommand.js.map +0 -1
- package/dist-cjs/commands/ListTagsForResourceCommand.js.map +0 -1
- package/dist-cjs/commands/OptOutSpeakerCommand.js.map +0 -1
- package/dist-cjs/commands/StartFraudsterRegistrationJobCommand.js.map +0 -1
- package/dist-cjs/commands/StartSpeakerEnrollmentJobCommand.js.map +0 -1
- package/dist-cjs/commands/TagResourceCommand.js.map +0 -1
- package/dist-cjs/commands/UntagResourceCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateDomainCommand.js.map +0 -1
- package/dist-cjs/endpoints.js.map +0 -1
- package/dist-cjs/index.js.map +0 -1
- package/dist-cjs/models/index.js.map +0 -1
- package/dist-cjs/models/models_0.js.map +0 -1
- package/dist-cjs/pagination/Interfaces.js.map +0 -1
- package/dist-cjs/pagination/ListDomainsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListFraudsterRegistrationJobsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListSpeakerEnrollmentJobsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListSpeakersPaginator.js.map +0 -1
- package/dist-cjs/protocols/Aws_json1_0.js.map +0 -1
- package/dist-cjs/runtimeConfig.browser.js.map +0 -1
- package/dist-cjs/runtimeConfig.js.map +0 -1
- package/dist-cjs/runtimeConfig.native.js.map +0 -1
- package/dist-cjs/runtimeConfig.shared.js.map +0 -1
- package/dist-es/VoiceID.js.map +0 -1
- package/dist-es/VoiceIDClient.js.map +0 -1
- package/dist-es/commands/CreateDomainCommand.js.map +0 -1
- package/dist-es/commands/DeleteDomainCommand.js.map +0 -1
- package/dist-es/commands/DeleteFraudsterCommand.js.map +0 -1
- package/dist-es/commands/DeleteSpeakerCommand.js.map +0 -1
- package/dist-es/commands/DescribeDomainCommand.js.map +0 -1
- package/dist-es/commands/DescribeFraudsterCommand.js.map +0 -1
- package/dist-es/commands/DescribeFraudsterRegistrationJobCommand.js.map +0 -1
- package/dist-es/commands/DescribeSpeakerCommand.js.map +0 -1
- package/dist-es/commands/DescribeSpeakerEnrollmentJobCommand.js.map +0 -1
- package/dist-es/commands/EvaluateSessionCommand.js.map +0 -1
- package/dist-es/commands/ListDomainsCommand.js.map +0 -1
- package/dist-es/commands/ListFraudsterRegistrationJobsCommand.js.map +0 -1
- package/dist-es/commands/ListSpeakerEnrollmentJobsCommand.js.map +0 -1
- package/dist-es/commands/ListSpeakersCommand.js.map +0 -1
- package/dist-es/commands/ListTagsForResourceCommand.js.map +0 -1
- package/dist-es/commands/OptOutSpeakerCommand.js.map +0 -1
- package/dist-es/commands/StartFraudsterRegistrationJobCommand.js.map +0 -1
- package/dist-es/commands/StartSpeakerEnrollmentJobCommand.js.map +0 -1
- package/dist-es/commands/TagResourceCommand.js.map +0 -1
- package/dist-es/commands/UntagResourceCommand.js.map +0 -1
- package/dist-es/commands/UpdateDomainCommand.js.map +0 -1
- package/dist-es/endpoints.js.map +0 -1
- package/dist-es/index.js.map +0 -1
- package/dist-es/models/index.js.map +0 -1
- package/dist-es/models/models_0.js.map +0 -1
- package/dist-es/pagination/Interfaces.js.map +0 -1
- package/dist-es/pagination/ListDomainsPaginator.js.map +0 -1
- package/dist-es/pagination/ListFraudsterRegistrationJobsPaginator.js.map +0 -1
- package/dist-es/pagination/ListSpeakerEnrollmentJobsPaginator.js.map +0 -1
- package/dist-es/pagination/ListSpeakersPaginator.js.map +0 -1
- package/dist-es/protocols/Aws_json1_0.js.map +0 -1
- package/dist-es/runtimeConfig.browser.js.map +0 -1
- package/dist-es/runtimeConfig.js.map +0 -1
- package/dist-es/runtimeConfig.native.js.map +0 -1
- package/dist-es/runtimeConfig.shared.js.map +0 -1
- package/jest.config.js +0 -4
- package/src/VoiceID.ts +0 -769
- package/src/VoiceIDClient.ts +0 -322
- package/src/commands/CreateDomainCommand.ts +0 -97
- package/src/commands/DeleteDomainCommand.ts +0 -95
- package/src/commands/DeleteFraudsterCommand.ts +0 -95
- package/src/commands/DeleteSpeakerCommand.ts +0 -95
- package/src/commands/DescribeDomainCommand.ts +0 -95
- package/src/commands/DescribeFraudsterCommand.ts +0 -95
- package/src/commands/DescribeFraudsterRegistrationJobCommand.ts +0 -103
- package/src/commands/DescribeSpeakerCommand.ts +0 -95
- package/src/commands/DescribeSpeakerEnrollmentJobCommand.ts +0 -100
- package/src/commands/EvaluateSessionCommand.ts +0 -96
- package/src/commands/ListDomainsCommand.ts +0 -96
- package/src/commands/ListFraudsterRegistrationJobsCommand.ts +0 -103
- package/src/commands/ListSpeakerEnrollmentJobsCommand.ts +0 -100
- package/src/commands/ListSpeakersCommand.ts +0 -95
- package/src/commands/ListTagsForResourceCommand.ts +0 -95
- package/src/commands/OptOutSpeakerCommand.ts +0 -99
- package/src/commands/StartFraudsterRegistrationJobCommand.ts +0 -100
- package/src/commands/StartSpeakerEnrollmentJobCommand.ts +0 -98
- package/src/commands/TagResourceCommand.ts +0 -95
- package/src/commands/UntagResourceCommand.ts +0 -95
- package/src/commands/UpdateDomainCommand.ts +0 -96
- package/src/endpoints.ts +0 -57
- package/src/index.ts +0 -29
- package/src/models/index.ts +0 -1
- package/src/models/models_0.ts +0 -2153
- package/src/pagination/Interfaces.ts +0 -8
- package/src/pagination/ListDomainsPaginator.ts +0 -55
- package/src/pagination/ListFraudsterRegistrationJobsPaginator.ts +0 -59
- package/src/pagination/ListSpeakerEnrollmentJobsPaginator.ts +0 -59
- package/src/pagination/ListSpeakersPaginator.ts +0 -59
- package/src/protocols/Aws_json1_0.ts +0 -3488
- package/src/runtimeConfig.browser.ts +0 -41
- package/src/runtimeConfig.native.ts +0 -17
- package/src/runtimeConfig.shared.ts +0 -17
- package/src/runtimeConfig.ts +0 -46
- package/tsconfig.es.json +0 -10
- package/tsconfig.json +0 -33
- package/tsconfig.types.json +0 -9
|
@@ -1,3488 +0,0 @@
|
|
|
1
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
2
|
-
import {
|
|
3
|
-
expectInt32 as __expectInt32,
|
|
4
|
-
expectNonNull as __expectNonNull,
|
|
5
|
-
expectNumber as __expectNumber,
|
|
6
|
-
expectString as __expectString,
|
|
7
|
-
parseEpochTimestamp as __parseEpochTimestamp,
|
|
8
|
-
} from "@aws-sdk/smithy-client";
|
|
9
|
-
import {
|
|
10
|
-
Endpoint as __Endpoint,
|
|
11
|
-
HeaderBag as __HeaderBag,
|
|
12
|
-
MetadataBearer as __MetadataBearer,
|
|
13
|
-
ResponseMetadata as __ResponseMetadata,
|
|
14
|
-
SerdeContext as __SerdeContext,
|
|
15
|
-
SmithyException as __SmithyException,
|
|
16
|
-
} from "@aws-sdk/types";
|
|
17
|
-
import { v4 as generateIdempotencyToken } from "uuid";
|
|
18
|
-
|
|
19
|
-
import { CreateDomainCommandInput, CreateDomainCommandOutput } from "../commands/CreateDomainCommand";
|
|
20
|
-
import { DeleteDomainCommandInput, DeleteDomainCommandOutput } from "../commands/DeleteDomainCommand";
|
|
21
|
-
import { DeleteFraudsterCommandInput, DeleteFraudsterCommandOutput } from "../commands/DeleteFraudsterCommand";
|
|
22
|
-
import { DeleteSpeakerCommandInput, DeleteSpeakerCommandOutput } from "../commands/DeleteSpeakerCommand";
|
|
23
|
-
import { DescribeDomainCommandInput, DescribeDomainCommandOutput } from "../commands/DescribeDomainCommand";
|
|
24
|
-
import { DescribeFraudsterCommandInput, DescribeFraudsterCommandOutput } from "../commands/DescribeFraudsterCommand";
|
|
25
|
-
import {
|
|
26
|
-
DescribeFraudsterRegistrationJobCommandInput,
|
|
27
|
-
DescribeFraudsterRegistrationJobCommandOutput,
|
|
28
|
-
} from "../commands/DescribeFraudsterRegistrationJobCommand";
|
|
29
|
-
import { DescribeSpeakerCommandInput, DescribeSpeakerCommandOutput } from "../commands/DescribeSpeakerCommand";
|
|
30
|
-
import {
|
|
31
|
-
DescribeSpeakerEnrollmentJobCommandInput,
|
|
32
|
-
DescribeSpeakerEnrollmentJobCommandOutput,
|
|
33
|
-
} from "../commands/DescribeSpeakerEnrollmentJobCommand";
|
|
34
|
-
import { EvaluateSessionCommandInput, EvaluateSessionCommandOutput } from "../commands/EvaluateSessionCommand";
|
|
35
|
-
import { ListDomainsCommandInput, ListDomainsCommandOutput } from "../commands/ListDomainsCommand";
|
|
36
|
-
import {
|
|
37
|
-
ListFraudsterRegistrationJobsCommandInput,
|
|
38
|
-
ListFraudsterRegistrationJobsCommandOutput,
|
|
39
|
-
} from "../commands/ListFraudsterRegistrationJobsCommand";
|
|
40
|
-
import {
|
|
41
|
-
ListSpeakerEnrollmentJobsCommandInput,
|
|
42
|
-
ListSpeakerEnrollmentJobsCommandOutput,
|
|
43
|
-
} from "../commands/ListSpeakerEnrollmentJobsCommand";
|
|
44
|
-
import { ListSpeakersCommandInput, ListSpeakersCommandOutput } from "../commands/ListSpeakersCommand";
|
|
45
|
-
import {
|
|
46
|
-
ListTagsForResourceCommandInput,
|
|
47
|
-
ListTagsForResourceCommandOutput,
|
|
48
|
-
} from "../commands/ListTagsForResourceCommand";
|
|
49
|
-
import { OptOutSpeakerCommandInput, OptOutSpeakerCommandOutput } from "../commands/OptOutSpeakerCommand";
|
|
50
|
-
import {
|
|
51
|
-
StartFraudsterRegistrationJobCommandInput,
|
|
52
|
-
StartFraudsterRegistrationJobCommandOutput,
|
|
53
|
-
} from "../commands/StartFraudsterRegistrationJobCommand";
|
|
54
|
-
import {
|
|
55
|
-
StartSpeakerEnrollmentJobCommandInput,
|
|
56
|
-
StartSpeakerEnrollmentJobCommandOutput,
|
|
57
|
-
} from "../commands/StartSpeakerEnrollmentJobCommand";
|
|
58
|
-
import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand";
|
|
59
|
-
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand";
|
|
60
|
-
import { UpdateDomainCommandInput, UpdateDomainCommandOutput } from "../commands/UpdateDomainCommand";
|
|
61
|
-
import {
|
|
62
|
-
AccessDeniedException,
|
|
63
|
-
AuthenticationConfiguration,
|
|
64
|
-
AuthenticationResult,
|
|
65
|
-
ConflictException,
|
|
66
|
-
CreateDomainRequest,
|
|
67
|
-
CreateDomainResponse,
|
|
68
|
-
DeleteDomainRequest,
|
|
69
|
-
DeleteFraudsterRequest,
|
|
70
|
-
DeleteSpeakerRequest,
|
|
71
|
-
DescribeDomainRequest,
|
|
72
|
-
DescribeDomainResponse,
|
|
73
|
-
DescribeFraudsterRegistrationJobRequest,
|
|
74
|
-
DescribeFraudsterRegistrationJobResponse,
|
|
75
|
-
DescribeFraudsterRequest,
|
|
76
|
-
DescribeFraudsterResponse,
|
|
77
|
-
DescribeSpeakerEnrollmentJobRequest,
|
|
78
|
-
DescribeSpeakerEnrollmentJobResponse,
|
|
79
|
-
DescribeSpeakerRequest,
|
|
80
|
-
DescribeSpeakerResponse,
|
|
81
|
-
Domain,
|
|
82
|
-
DomainSummary,
|
|
83
|
-
EnrollmentConfig,
|
|
84
|
-
EnrollmentJobFraudDetectionConfig,
|
|
85
|
-
EvaluateSessionRequest,
|
|
86
|
-
EvaluateSessionResponse,
|
|
87
|
-
FailureDetails,
|
|
88
|
-
FraudDetectionConfiguration,
|
|
89
|
-
FraudDetectionReason,
|
|
90
|
-
FraudDetectionResult,
|
|
91
|
-
FraudRiskDetails,
|
|
92
|
-
Fraudster,
|
|
93
|
-
FraudsterRegistrationJob,
|
|
94
|
-
FraudsterRegistrationJobSummary,
|
|
95
|
-
InputDataConfig,
|
|
96
|
-
InternalServerException,
|
|
97
|
-
JobProgress,
|
|
98
|
-
KnownFraudsterRisk,
|
|
99
|
-
ListDomainsRequest,
|
|
100
|
-
ListDomainsResponse,
|
|
101
|
-
ListFraudsterRegistrationJobsRequest,
|
|
102
|
-
ListFraudsterRegistrationJobsResponse,
|
|
103
|
-
ListSpeakerEnrollmentJobsRequest,
|
|
104
|
-
ListSpeakerEnrollmentJobsResponse,
|
|
105
|
-
ListSpeakersRequest,
|
|
106
|
-
ListSpeakersResponse,
|
|
107
|
-
ListTagsForResourceRequest,
|
|
108
|
-
ListTagsForResourceResponse,
|
|
109
|
-
OptOutSpeakerRequest,
|
|
110
|
-
OptOutSpeakerResponse,
|
|
111
|
-
OutputDataConfig,
|
|
112
|
-
RegistrationConfig,
|
|
113
|
-
ResourceNotFoundException,
|
|
114
|
-
ServerSideEncryptionConfiguration,
|
|
115
|
-
ServiceQuotaExceededException,
|
|
116
|
-
Speaker,
|
|
117
|
-
SpeakerEnrollmentJob,
|
|
118
|
-
SpeakerEnrollmentJobSummary,
|
|
119
|
-
SpeakerSummary,
|
|
120
|
-
StartFraudsterRegistrationJobRequest,
|
|
121
|
-
StartFraudsterRegistrationJobResponse,
|
|
122
|
-
StartSpeakerEnrollmentJobRequest,
|
|
123
|
-
StartSpeakerEnrollmentJobResponse,
|
|
124
|
-
Tag,
|
|
125
|
-
TagResourceRequest,
|
|
126
|
-
TagResourceResponse,
|
|
127
|
-
ThrottlingException,
|
|
128
|
-
UntagResourceRequest,
|
|
129
|
-
UntagResourceResponse,
|
|
130
|
-
UpdateDomainRequest,
|
|
131
|
-
UpdateDomainResponse,
|
|
132
|
-
ValidationException,
|
|
133
|
-
} from "../models/models_0";
|
|
134
|
-
|
|
135
|
-
export const serializeAws_json1_0CreateDomainCommand = async (
|
|
136
|
-
input: CreateDomainCommandInput,
|
|
137
|
-
context: __SerdeContext
|
|
138
|
-
): Promise<__HttpRequest> => {
|
|
139
|
-
const headers: __HeaderBag = {
|
|
140
|
-
"content-type": "application/x-amz-json-1.0",
|
|
141
|
-
"x-amz-target": "VoiceID.CreateDomain",
|
|
142
|
-
};
|
|
143
|
-
let body: any;
|
|
144
|
-
body = JSON.stringify(serializeAws_json1_0CreateDomainRequest(input, context));
|
|
145
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
export const serializeAws_json1_0DeleteDomainCommand = async (
|
|
149
|
-
input: DeleteDomainCommandInput,
|
|
150
|
-
context: __SerdeContext
|
|
151
|
-
): Promise<__HttpRequest> => {
|
|
152
|
-
const headers: __HeaderBag = {
|
|
153
|
-
"content-type": "application/x-amz-json-1.0",
|
|
154
|
-
"x-amz-target": "VoiceID.DeleteDomain",
|
|
155
|
-
};
|
|
156
|
-
let body: any;
|
|
157
|
-
body = JSON.stringify(serializeAws_json1_0DeleteDomainRequest(input, context));
|
|
158
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
export const serializeAws_json1_0DeleteFraudsterCommand = async (
|
|
162
|
-
input: DeleteFraudsterCommandInput,
|
|
163
|
-
context: __SerdeContext
|
|
164
|
-
): Promise<__HttpRequest> => {
|
|
165
|
-
const headers: __HeaderBag = {
|
|
166
|
-
"content-type": "application/x-amz-json-1.0",
|
|
167
|
-
"x-amz-target": "VoiceID.DeleteFraudster",
|
|
168
|
-
};
|
|
169
|
-
let body: any;
|
|
170
|
-
body = JSON.stringify(serializeAws_json1_0DeleteFraudsterRequest(input, context));
|
|
171
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
export const serializeAws_json1_0DeleteSpeakerCommand = async (
|
|
175
|
-
input: DeleteSpeakerCommandInput,
|
|
176
|
-
context: __SerdeContext
|
|
177
|
-
): Promise<__HttpRequest> => {
|
|
178
|
-
const headers: __HeaderBag = {
|
|
179
|
-
"content-type": "application/x-amz-json-1.0",
|
|
180
|
-
"x-amz-target": "VoiceID.DeleteSpeaker",
|
|
181
|
-
};
|
|
182
|
-
let body: any;
|
|
183
|
-
body = JSON.stringify(serializeAws_json1_0DeleteSpeakerRequest(input, context));
|
|
184
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
export const serializeAws_json1_0DescribeDomainCommand = async (
|
|
188
|
-
input: DescribeDomainCommandInput,
|
|
189
|
-
context: __SerdeContext
|
|
190
|
-
): Promise<__HttpRequest> => {
|
|
191
|
-
const headers: __HeaderBag = {
|
|
192
|
-
"content-type": "application/x-amz-json-1.0",
|
|
193
|
-
"x-amz-target": "VoiceID.DescribeDomain",
|
|
194
|
-
};
|
|
195
|
-
let body: any;
|
|
196
|
-
body = JSON.stringify(serializeAws_json1_0DescribeDomainRequest(input, context));
|
|
197
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
198
|
-
};
|
|
199
|
-
|
|
200
|
-
export const serializeAws_json1_0DescribeFraudsterCommand = async (
|
|
201
|
-
input: DescribeFraudsterCommandInput,
|
|
202
|
-
context: __SerdeContext
|
|
203
|
-
): Promise<__HttpRequest> => {
|
|
204
|
-
const headers: __HeaderBag = {
|
|
205
|
-
"content-type": "application/x-amz-json-1.0",
|
|
206
|
-
"x-amz-target": "VoiceID.DescribeFraudster",
|
|
207
|
-
};
|
|
208
|
-
let body: any;
|
|
209
|
-
body = JSON.stringify(serializeAws_json1_0DescribeFraudsterRequest(input, context));
|
|
210
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
211
|
-
};
|
|
212
|
-
|
|
213
|
-
export const serializeAws_json1_0DescribeFraudsterRegistrationJobCommand = async (
|
|
214
|
-
input: DescribeFraudsterRegistrationJobCommandInput,
|
|
215
|
-
context: __SerdeContext
|
|
216
|
-
): Promise<__HttpRequest> => {
|
|
217
|
-
const headers: __HeaderBag = {
|
|
218
|
-
"content-type": "application/x-amz-json-1.0",
|
|
219
|
-
"x-amz-target": "VoiceID.DescribeFraudsterRegistrationJob",
|
|
220
|
-
};
|
|
221
|
-
let body: any;
|
|
222
|
-
body = JSON.stringify(serializeAws_json1_0DescribeFraudsterRegistrationJobRequest(input, context));
|
|
223
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
224
|
-
};
|
|
225
|
-
|
|
226
|
-
export const serializeAws_json1_0DescribeSpeakerCommand = async (
|
|
227
|
-
input: DescribeSpeakerCommandInput,
|
|
228
|
-
context: __SerdeContext
|
|
229
|
-
): Promise<__HttpRequest> => {
|
|
230
|
-
const headers: __HeaderBag = {
|
|
231
|
-
"content-type": "application/x-amz-json-1.0",
|
|
232
|
-
"x-amz-target": "VoiceID.DescribeSpeaker",
|
|
233
|
-
};
|
|
234
|
-
let body: any;
|
|
235
|
-
body = JSON.stringify(serializeAws_json1_0DescribeSpeakerRequest(input, context));
|
|
236
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
237
|
-
};
|
|
238
|
-
|
|
239
|
-
export const serializeAws_json1_0DescribeSpeakerEnrollmentJobCommand = async (
|
|
240
|
-
input: DescribeSpeakerEnrollmentJobCommandInput,
|
|
241
|
-
context: __SerdeContext
|
|
242
|
-
): Promise<__HttpRequest> => {
|
|
243
|
-
const headers: __HeaderBag = {
|
|
244
|
-
"content-type": "application/x-amz-json-1.0",
|
|
245
|
-
"x-amz-target": "VoiceID.DescribeSpeakerEnrollmentJob",
|
|
246
|
-
};
|
|
247
|
-
let body: any;
|
|
248
|
-
body = JSON.stringify(serializeAws_json1_0DescribeSpeakerEnrollmentJobRequest(input, context));
|
|
249
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
250
|
-
};
|
|
251
|
-
|
|
252
|
-
export const serializeAws_json1_0EvaluateSessionCommand = async (
|
|
253
|
-
input: EvaluateSessionCommandInput,
|
|
254
|
-
context: __SerdeContext
|
|
255
|
-
): Promise<__HttpRequest> => {
|
|
256
|
-
const headers: __HeaderBag = {
|
|
257
|
-
"content-type": "application/x-amz-json-1.0",
|
|
258
|
-
"x-amz-target": "VoiceID.EvaluateSession",
|
|
259
|
-
};
|
|
260
|
-
let body: any;
|
|
261
|
-
body = JSON.stringify(serializeAws_json1_0EvaluateSessionRequest(input, context));
|
|
262
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
263
|
-
};
|
|
264
|
-
|
|
265
|
-
export const serializeAws_json1_0ListDomainsCommand = async (
|
|
266
|
-
input: ListDomainsCommandInput,
|
|
267
|
-
context: __SerdeContext
|
|
268
|
-
): Promise<__HttpRequest> => {
|
|
269
|
-
const headers: __HeaderBag = {
|
|
270
|
-
"content-type": "application/x-amz-json-1.0",
|
|
271
|
-
"x-amz-target": "VoiceID.ListDomains",
|
|
272
|
-
};
|
|
273
|
-
let body: any;
|
|
274
|
-
body = JSON.stringify(serializeAws_json1_0ListDomainsRequest(input, context));
|
|
275
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
276
|
-
};
|
|
277
|
-
|
|
278
|
-
export const serializeAws_json1_0ListFraudsterRegistrationJobsCommand = async (
|
|
279
|
-
input: ListFraudsterRegistrationJobsCommandInput,
|
|
280
|
-
context: __SerdeContext
|
|
281
|
-
): Promise<__HttpRequest> => {
|
|
282
|
-
const headers: __HeaderBag = {
|
|
283
|
-
"content-type": "application/x-amz-json-1.0",
|
|
284
|
-
"x-amz-target": "VoiceID.ListFraudsterRegistrationJobs",
|
|
285
|
-
};
|
|
286
|
-
let body: any;
|
|
287
|
-
body = JSON.stringify(serializeAws_json1_0ListFraudsterRegistrationJobsRequest(input, context));
|
|
288
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
289
|
-
};
|
|
290
|
-
|
|
291
|
-
export const serializeAws_json1_0ListSpeakerEnrollmentJobsCommand = async (
|
|
292
|
-
input: ListSpeakerEnrollmentJobsCommandInput,
|
|
293
|
-
context: __SerdeContext
|
|
294
|
-
): Promise<__HttpRequest> => {
|
|
295
|
-
const headers: __HeaderBag = {
|
|
296
|
-
"content-type": "application/x-amz-json-1.0",
|
|
297
|
-
"x-amz-target": "VoiceID.ListSpeakerEnrollmentJobs",
|
|
298
|
-
};
|
|
299
|
-
let body: any;
|
|
300
|
-
body = JSON.stringify(serializeAws_json1_0ListSpeakerEnrollmentJobsRequest(input, context));
|
|
301
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
302
|
-
};
|
|
303
|
-
|
|
304
|
-
export const serializeAws_json1_0ListSpeakersCommand = async (
|
|
305
|
-
input: ListSpeakersCommandInput,
|
|
306
|
-
context: __SerdeContext
|
|
307
|
-
): Promise<__HttpRequest> => {
|
|
308
|
-
const headers: __HeaderBag = {
|
|
309
|
-
"content-type": "application/x-amz-json-1.0",
|
|
310
|
-
"x-amz-target": "VoiceID.ListSpeakers",
|
|
311
|
-
};
|
|
312
|
-
let body: any;
|
|
313
|
-
body = JSON.stringify(serializeAws_json1_0ListSpeakersRequest(input, context));
|
|
314
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
315
|
-
};
|
|
316
|
-
|
|
317
|
-
export const serializeAws_json1_0ListTagsForResourceCommand = async (
|
|
318
|
-
input: ListTagsForResourceCommandInput,
|
|
319
|
-
context: __SerdeContext
|
|
320
|
-
): Promise<__HttpRequest> => {
|
|
321
|
-
const headers: __HeaderBag = {
|
|
322
|
-
"content-type": "application/x-amz-json-1.0",
|
|
323
|
-
"x-amz-target": "VoiceID.ListTagsForResource",
|
|
324
|
-
};
|
|
325
|
-
let body: any;
|
|
326
|
-
body = JSON.stringify(serializeAws_json1_0ListTagsForResourceRequest(input, context));
|
|
327
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
328
|
-
};
|
|
329
|
-
|
|
330
|
-
export const serializeAws_json1_0OptOutSpeakerCommand = async (
|
|
331
|
-
input: OptOutSpeakerCommandInput,
|
|
332
|
-
context: __SerdeContext
|
|
333
|
-
): Promise<__HttpRequest> => {
|
|
334
|
-
const headers: __HeaderBag = {
|
|
335
|
-
"content-type": "application/x-amz-json-1.0",
|
|
336
|
-
"x-amz-target": "VoiceID.OptOutSpeaker",
|
|
337
|
-
};
|
|
338
|
-
let body: any;
|
|
339
|
-
body = JSON.stringify(serializeAws_json1_0OptOutSpeakerRequest(input, context));
|
|
340
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
341
|
-
};
|
|
342
|
-
|
|
343
|
-
export const serializeAws_json1_0StartFraudsterRegistrationJobCommand = async (
|
|
344
|
-
input: StartFraudsterRegistrationJobCommandInput,
|
|
345
|
-
context: __SerdeContext
|
|
346
|
-
): Promise<__HttpRequest> => {
|
|
347
|
-
const headers: __HeaderBag = {
|
|
348
|
-
"content-type": "application/x-amz-json-1.0",
|
|
349
|
-
"x-amz-target": "VoiceID.StartFraudsterRegistrationJob",
|
|
350
|
-
};
|
|
351
|
-
let body: any;
|
|
352
|
-
body = JSON.stringify(serializeAws_json1_0StartFraudsterRegistrationJobRequest(input, context));
|
|
353
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
354
|
-
};
|
|
355
|
-
|
|
356
|
-
export const serializeAws_json1_0StartSpeakerEnrollmentJobCommand = async (
|
|
357
|
-
input: StartSpeakerEnrollmentJobCommandInput,
|
|
358
|
-
context: __SerdeContext
|
|
359
|
-
): Promise<__HttpRequest> => {
|
|
360
|
-
const headers: __HeaderBag = {
|
|
361
|
-
"content-type": "application/x-amz-json-1.0",
|
|
362
|
-
"x-amz-target": "VoiceID.StartSpeakerEnrollmentJob",
|
|
363
|
-
};
|
|
364
|
-
let body: any;
|
|
365
|
-
body = JSON.stringify(serializeAws_json1_0StartSpeakerEnrollmentJobRequest(input, context));
|
|
366
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
367
|
-
};
|
|
368
|
-
|
|
369
|
-
export const serializeAws_json1_0TagResourceCommand = async (
|
|
370
|
-
input: TagResourceCommandInput,
|
|
371
|
-
context: __SerdeContext
|
|
372
|
-
): Promise<__HttpRequest> => {
|
|
373
|
-
const headers: __HeaderBag = {
|
|
374
|
-
"content-type": "application/x-amz-json-1.0",
|
|
375
|
-
"x-amz-target": "VoiceID.TagResource",
|
|
376
|
-
};
|
|
377
|
-
let body: any;
|
|
378
|
-
body = JSON.stringify(serializeAws_json1_0TagResourceRequest(input, context));
|
|
379
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
380
|
-
};
|
|
381
|
-
|
|
382
|
-
export const serializeAws_json1_0UntagResourceCommand = async (
|
|
383
|
-
input: UntagResourceCommandInput,
|
|
384
|
-
context: __SerdeContext
|
|
385
|
-
): Promise<__HttpRequest> => {
|
|
386
|
-
const headers: __HeaderBag = {
|
|
387
|
-
"content-type": "application/x-amz-json-1.0",
|
|
388
|
-
"x-amz-target": "VoiceID.UntagResource",
|
|
389
|
-
};
|
|
390
|
-
let body: any;
|
|
391
|
-
body = JSON.stringify(serializeAws_json1_0UntagResourceRequest(input, context));
|
|
392
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
393
|
-
};
|
|
394
|
-
|
|
395
|
-
export const serializeAws_json1_0UpdateDomainCommand = async (
|
|
396
|
-
input: UpdateDomainCommandInput,
|
|
397
|
-
context: __SerdeContext
|
|
398
|
-
): Promise<__HttpRequest> => {
|
|
399
|
-
const headers: __HeaderBag = {
|
|
400
|
-
"content-type": "application/x-amz-json-1.0",
|
|
401
|
-
"x-amz-target": "VoiceID.UpdateDomain",
|
|
402
|
-
};
|
|
403
|
-
let body: any;
|
|
404
|
-
body = JSON.stringify(serializeAws_json1_0UpdateDomainRequest(input, context));
|
|
405
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
406
|
-
};
|
|
407
|
-
|
|
408
|
-
export const deserializeAws_json1_0CreateDomainCommand = async (
|
|
409
|
-
output: __HttpResponse,
|
|
410
|
-
context: __SerdeContext
|
|
411
|
-
): Promise<CreateDomainCommandOutput> => {
|
|
412
|
-
if (output.statusCode >= 300) {
|
|
413
|
-
return deserializeAws_json1_0CreateDomainCommandError(output, context);
|
|
414
|
-
}
|
|
415
|
-
const data: any = await parseBody(output.body, context);
|
|
416
|
-
let contents: any = {};
|
|
417
|
-
contents = deserializeAws_json1_0CreateDomainResponse(data, context);
|
|
418
|
-
const response: CreateDomainCommandOutput = {
|
|
419
|
-
$metadata: deserializeMetadata(output),
|
|
420
|
-
...contents,
|
|
421
|
-
};
|
|
422
|
-
return Promise.resolve(response);
|
|
423
|
-
};
|
|
424
|
-
|
|
425
|
-
const deserializeAws_json1_0CreateDomainCommandError = async (
|
|
426
|
-
output: __HttpResponse,
|
|
427
|
-
context: __SerdeContext
|
|
428
|
-
): Promise<CreateDomainCommandOutput> => {
|
|
429
|
-
const parsedOutput: any = {
|
|
430
|
-
...output,
|
|
431
|
-
body: await parseBody(output.body, context),
|
|
432
|
-
};
|
|
433
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
434
|
-
let errorCode = "UnknownError";
|
|
435
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
436
|
-
switch (errorCode) {
|
|
437
|
-
case "AccessDeniedException":
|
|
438
|
-
case "com.amazonaws.voiceid#AccessDeniedException":
|
|
439
|
-
response = {
|
|
440
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
441
|
-
name: errorCode,
|
|
442
|
-
$metadata: deserializeMetadata(output),
|
|
443
|
-
};
|
|
444
|
-
break;
|
|
445
|
-
case "ConflictException":
|
|
446
|
-
case "com.amazonaws.voiceid#ConflictException":
|
|
447
|
-
response = {
|
|
448
|
-
...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)),
|
|
449
|
-
name: errorCode,
|
|
450
|
-
$metadata: deserializeMetadata(output),
|
|
451
|
-
};
|
|
452
|
-
break;
|
|
453
|
-
case "InternalServerException":
|
|
454
|
-
case "com.amazonaws.voiceid#InternalServerException":
|
|
455
|
-
response = {
|
|
456
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
457
|
-
name: errorCode,
|
|
458
|
-
$metadata: deserializeMetadata(output),
|
|
459
|
-
};
|
|
460
|
-
break;
|
|
461
|
-
case "ResourceNotFoundException":
|
|
462
|
-
case "com.amazonaws.voiceid#ResourceNotFoundException":
|
|
463
|
-
response = {
|
|
464
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
465
|
-
name: errorCode,
|
|
466
|
-
$metadata: deserializeMetadata(output),
|
|
467
|
-
};
|
|
468
|
-
break;
|
|
469
|
-
case "ServiceQuotaExceededException":
|
|
470
|
-
case "com.amazonaws.voiceid#ServiceQuotaExceededException":
|
|
471
|
-
response = {
|
|
472
|
-
...(await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
473
|
-
name: errorCode,
|
|
474
|
-
$metadata: deserializeMetadata(output),
|
|
475
|
-
};
|
|
476
|
-
break;
|
|
477
|
-
case "ThrottlingException":
|
|
478
|
-
case "com.amazonaws.voiceid#ThrottlingException":
|
|
479
|
-
response = {
|
|
480
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
481
|
-
name: errorCode,
|
|
482
|
-
$metadata: deserializeMetadata(output),
|
|
483
|
-
};
|
|
484
|
-
break;
|
|
485
|
-
case "ValidationException":
|
|
486
|
-
case "com.amazonaws.voiceid#ValidationException":
|
|
487
|
-
response = {
|
|
488
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
489
|
-
name: errorCode,
|
|
490
|
-
$metadata: deserializeMetadata(output),
|
|
491
|
-
};
|
|
492
|
-
break;
|
|
493
|
-
default:
|
|
494
|
-
const parsedBody = parsedOutput.body;
|
|
495
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
496
|
-
response = {
|
|
497
|
-
...parsedBody,
|
|
498
|
-
name: `${errorCode}`,
|
|
499
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
500
|
-
$fault: "client",
|
|
501
|
-
$metadata: deserializeMetadata(output),
|
|
502
|
-
} as any;
|
|
503
|
-
}
|
|
504
|
-
const message = response.message || response.Message || errorCode;
|
|
505
|
-
response.message = message;
|
|
506
|
-
delete response.Message;
|
|
507
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
508
|
-
};
|
|
509
|
-
|
|
510
|
-
export const deserializeAws_json1_0DeleteDomainCommand = async (
|
|
511
|
-
output: __HttpResponse,
|
|
512
|
-
context: __SerdeContext
|
|
513
|
-
): Promise<DeleteDomainCommandOutput> => {
|
|
514
|
-
if (output.statusCode >= 300) {
|
|
515
|
-
return deserializeAws_json1_0DeleteDomainCommandError(output, context);
|
|
516
|
-
}
|
|
517
|
-
await collectBody(output.body, context);
|
|
518
|
-
const response: DeleteDomainCommandOutput = {
|
|
519
|
-
$metadata: deserializeMetadata(output),
|
|
520
|
-
};
|
|
521
|
-
return Promise.resolve(response);
|
|
522
|
-
};
|
|
523
|
-
|
|
524
|
-
const deserializeAws_json1_0DeleteDomainCommandError = async (
|
|
525
|
-
output: __HttpResponse,
|
|
526
|
-
context: __SerdeContext
|
|
527
|
-
): Promise<DeleteDomainCommandOutput> => {
|
|
528
|
-
const parsedOutput: any = {
|
|
529
|
-
...output,
|
|
530
|
-
body: await parseBody(output.body, context),
|
|
531
|
-
};
|
|
532
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
533
|
-
let errorCode = "UnknownError";
|
|
534
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
535
|
-
switch (errorCode) {
|
|
536
|
-
case "AccessDeniedException":
|
|
537
|
-
case "com.amazonaws.voiceid#AccessDeniedException":
|
|
538
|
-
response = {
|
|
539
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
540
|
-
name: errorCode,
|
|
541
|
-
$metadata: deserializeMetadata(output),
|
|
542
|
-
};
|
|
543
|
-
break;
|
|
544
|
-
case "ConflictException":
|
|
545
|
-
case "com.amazonaws.voiceid#ConflictException":
|
|
546
|
-
response = {
|
|
547
|
-
...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)),
|
|
548
|
-
name: errorCode,
|
|
549
|
-
$metadata: deserializeMetadata(output),
|
|
550
|
-
};
|
|
551
|
-
break;
|
|
552
|
-
case "InternalServerException":
|
|
553
|
-
case "com.amazonaws.voiceid#InternalServerException":
|
|
554
|
-
response = {
|
|
555
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
556
|
-
name: errorCode,
|
|
557
|
-
$metadata: deserializeMetadata(output),
|
|
558
|
-
};
|
|
559
|
-
break;
|
|
560
|
-
case "ResourceNotFoundException":
|
|
561
|
-
case "com.amazonaws.voiceid#ResourceNotFoundException":
|
|
562
|
-
response = {
|
|
563
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
564
|
-
name: errorCode,
|
|
565
|
-
$metadata: deserializeMetadata(output),
|
|
566
|
-
};
|
|
567
|
-
break;
|
|
568
|
-
case "ThrottlingException":
|
|
569
|
-
case "com.amazonaws.voiceid#ThrottlingException":
|
|
570
|
-
response = {
|
|
571
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
572
|
-
name: errorCode,
|
|
573
|
-
$metadata: deserializeMetadata(output),
|
|
574
|
-
};
|
|
575
|
-
break;
|
|
576
|
-
case "ValidationException":
|
|
577
|
-
case "com.amazonaws.voiceid#ValidationException":
|
|
578
|
-
response = {
|
|
579
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
580
|
-
name: errorCode,
|
|
581
|
-
$metadata: deserializeMetadata(output),
|
|
582
|
-
};
|
|
583
|
-
break;
|
|
584
|
-
default:
|
|
585
|
-
const parsedBody = parsedOutput.body;
|
|
586
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
587
|
-
response = {
|
|
588
|
-
...parsedBody,
|
|
589
|
-
name: `${errorCode}`,
|
|
590
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
591
|
-
$fault: "client",
|
|
592
|
-
$metadata: deserializeMetadata(output),
|
|
593
|
-
} as any;
|
|
594
|
-
}
|
|
595
|
-
const message = response.message || response.Message || errorCode;
|
|
596
|
-
response.message = message;
|
|
597
|
-
delete response.Message;
|
|
598
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
599
|
-
};
|
|
600
|
-
|
|
601
|
-
export const deserializeAws_json1_0DeleteFraudsterCommand = async (
|
|
602
|
-
output: __HttpResponse,
|
|
603
|
-
context: __SerdeContext
|
|
604
|
-
): Promise<DeleteFraudsterCommandOutput> => {
|
|
605
|
-
if (output.statusCode >= 300) {
|
|
606
|
-
return deserializeAws_json1_0DeleteFraudsterCommandError(output, context);
|
|
607
|
-
}
|
|
608
|
-
await collectBody(output.body, context);
|
|
609
|
-
const response: DeleteFraudsterCommandOutput = {
|
|
610
|
-
$metadata: deserializeMetadata(output),
|
|
611
|
-
};
|
|
612
|
-
return Promise.resolve(response);
|
|
613
|
-
};
|
|
614
|
-
|
|
615
|
-
const deserializeAws_json1_0DeleteFraudsterCommandError = async (
|
|
616
|
-
output: __HttpResponse,
|
|
617
|
-
context: __SerdeContext
|
|
618
|
-
): Promise<DeleteFraudsterCommandOutput> => {
|
|
619
|
-
const parsedOutput: any = {
|
|
620
|
-
...output,
|
|
621
|
-
body: await parseBody(output.body, context),
|
|
622
|
-
};
|
|
623
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
624
|
-
let errorCode = "UnknownError";
|
|
625
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
626
|
-
switch (errorCode) {
|
|
627
|
-
case "AccessDeniedException":
|
|
628
|
-
case "com.amazonaws.voiceid#AccessDeniedException":
|
|
629
|
-
response = {
|
|
630
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
631
|
-
name: errorCode,
|
|
632
|
-
$metadata: deserializeMetadata(output),
|
|
633
|
-
};
|
|
634
|
-
break;
|
|
635
|
-
case "InternalServerException":
|
|
636
|
-
case "com.amazonaws.voiceid#InternalServerException":
|
|
637
|
-
response = {
|
|
638
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
639
|
-
name: errorCode,
|
|
640
|
-
$metadata: deserializeMetadata(output),
|
|
641
|
-
};
|
|
642
|
-
break;
|
|
643
|
-
case "ResourceNotFoundException":
|
|
644
|
-
case "com.amazonaws.voiceid#ResourceNotFoundException":
|
|
645
|
-
response = {
|
|
646
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
647
|
-
name: errorCode,
|
|
648
|
-
$metadata: deserializeMetadata(output),
|
|
649
|
-
};
|
|
650
|
-
break;
|
|
651
|
-
case "ThrottlingException":
|
|
652
|
-
case "com.amazonaws.voiceid#ThrottlingException":
|
|
653
|
-
response = {
|
|
654
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
655
|
-
name: errorCode,
|
|
656
|
-
$metadata: deserializeMetadata(output),
|
|
657
|
-
};
|
|
658
|
-
break;
|
|
659
|
-
case "ValidationException":
|
|
660
|
-
case "com.amazonaws.voiceid#ValidationException":
|
|
661
|
-
response = {
|
|
662
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
663
|
-
name: errorCode,
|
|
664
|
-
$metadata: deserializeMetadata(output),
|
|
665
|
-
};
|
|
666
|
-
break;
|
|
667
|
-
default:
|
|
668
|
-
const parsedBody = parsedOutput.body;
|
|
669
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
670
|
-
response = {
|
|
671
|
-
...parsedBody,
|
|
672
|
-
name: `${errorCode}`,
|
|
673
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
674
|
-
$fault: "client",
|
|
675
|
-
$metadata: deserializeMetadata(output),
|
|
676
|
-
} as any;
|
|
677
|
-
}
|
|
678
|
-
const message = response.message || response.Message || errorCode;
|
|
679
|
-
response.message = message;
|
|
680
|
-
delete response.Message;
|
|
681
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
682
|
-
};
|
|
683
|
-
|
|
684
|
-
export const deserializeAws_json1_0DeleteSpeakerCommand = async (
|
|
685
|
-
output: __HttpResponse,
|
|
686
|
-
context: __SerdeContext
|
|
687
|
-
): Promise<DeleteSpeakerCommandOutput> => {
|
|
688
|
-
if (output.statusCode >= 300) {
|
|
689
|
-
return deserializeAws_json1_0DeleteSpeakerCommandError(output, context);
|
|
690
|
-
}
|
|
691
|
-
await collectBody(output.body, context);
|
|
692
|
-
const response: DeleteSpeakerCommandOutput = {
|
|
693
|
-
$metadata: deserializeMetadata(output),
|
|
694
|
-
};
|
|
695
|
-
return Promise.resolve(response);
|
|
696
|
-
};
|
|
697
|
-
|
|
698
|
-
const deserializeAws_json1_0DeleteSpeakerCommandError = async (
|
|
699
|
-
output: __HttpResponse,
|
|
700
|
-
context: __SerdeContext
|
|
701
|
-
): Promise<DeleteSpeakerCommandOutput> => {
|
|
702
|
-
const parsedOutput: any = {
|
|
703
|
-
...output,
|
|
704
|
-
body: await parseBody(output.body, context),
|
|
705
|
-
};
|
|
706
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
707
|
-
let errorCode = "UnknownError";
|
|
708
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
709
|
-
switch (errorCode) {
|
|
710
|
-
case "AccessDeniedException":
|
|
711
|
-
case "com.amazonaws.voiceid#AccessDeniedException":
|
|
712
|
-
response = {
|
|
713
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
714
|
-
name: errorCode,
|
|
715
|
-
$metadata: deserializeMetadata(output),
|
|
716
|
-
};
|
|
717
|
-
break;
|
|
718
|
-
case "ConflictException":
|
|
719
|
-
case "com.amazonaws.voiceid#ConflictException":
|
|
720
|
-
response = {
|
|
721
|
-
...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)),
|
|
722
|
-
name: errorCode,
|
|
723
|
-
$metadata: deserializeMetadata(output),
|
|
724
|
-
};
|
|
725
|
-
break;
|
|
726
|
-
case "InternalServerException":
|
|
727
|
-
case "com.amazonaws.voiceid#InternalServerException":
|
|
728
|
-
response = {
|
|
729
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
730
|
-
name: errorCode,
|
|
731
|
-
$metadata: deserializeMetadata(output),
|
|
732
|
-
};
|
|
733
|
-
break;
|
|
734
|
-
case "ResourceNotFoundException":
|
|
735
|
-
case "com.amazonaws.voiceid#ResourceNotFoundException":
|
|
736
|
-
response = {
|
|
737
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
738
|
-
name: errorCode,
|
|
739
|
-
$metadata: deserializeMetadata(output),
|
|
740
|
-
};
|
|
741
|
-
break;
|
|
742
|
-
case "ThrottlingException":
|
|
743
|
-
case "com.amazonaws.voiceid#ThrottlingException":
|
|
744
|
-
response = {
|
|
745
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
746
|
-
name: errorCode,
|
|
747
|
-
$metadata: deserializeMetadata(output),
|
|
748
|
-
};
|
|
749
|
-
break;
|
|
750
|
-
case "ValidationException":
|
|
751
|
-
case "com.amazonaws.voiceid#ValidationException":
|
|
752
|
-
response = {
|
|
753
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
754
|
-
name: errorCode,
|
|
755
|
-
$metadata: deserializeMetadata(output),
|
|
756
|
-
};
|
|
757
|
-
break;
|
|
758
|
-
default:
|
|
759
|
-
const parsedBody = parsedOutput.body;
|
|
760
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
761
|
-
response = {
|
|
762
|
-
...parsedBody,
|
|
763
|
-
name: `${errorCode}`,
|
|
764
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
765
|
-
$fault: "client",
|
|
766
|
-
$metadata: deserializeMetadata(output),
|
|
767
|
-
} as any;
|
|
768
|
-
}
|
|
769
|
-
const message = response.message || response.Message || errorCode;
|
|
770
|
-
response.message = message;
|
|
771
|
-
delete response.Message;
|
|
772
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
773
|
-
};
|
|
774
|
-
|
|
775
|
-
export const deserializeAws_json1_0DescribeDomainCommand = async (
|
|
776
|
-
output: __HttpResponse,
|
|
777
|
-
context: __SerdeContext
|
|
778
|
-
): Promise<DescribeDomainCommandOutput> => {
|
|
779
|
-
if (output.statusCode >= 300) {
|
|
780
|
-
return deserializeAws_json1_0DescribeDomainCommandError(output, context);
|
|
781
|
-
}
|
|
782
|
-
const data: any = await parseBody(output.body, context);
|
|
783
|
-
let contents: any = {};
|
|
784
|
-
contents = deserializeAws_json1_0DescribeDomainResponse(data, context);
|
|
785
|
-
const response: DescribeDomainCommandOutput = {
|
|
786
|
-
$metadata: deserializeMetadata(output),
|
|
787
|
-
...contents,
|
|
788
|
-
};
|
|
789
|
-
return Promise.resolve(response);
|
|
790
|
-
};
|
|
791
|
-
|
|
792
|
-
const deserializeAws_json1_0DescribeDomainCommandError = async (
|
|
793
|
-
output: __HttpResponse,
|
|
794
|
-
context: __SerdeContext
|
|
795
|
-
): Promise<DescribeDomainCommandOutput> => {
|
|
796
|
-
const parsedOutput: any = {
|
|
797
|
-
...output,
|
|
798
|
-
body: await parseBody(output.body, context),
|
|
799
|
-
};
|
|
800
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
801
|
-
let errorCode = "UnknownError";
|
|
802
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
803
|
-
switch (errorCode) {
|
|
804
|
-
case "AccessDeniedException":
|
|
805
|
-
case "com.amazonaws.voiceid#AccessDeniedException":
|
|
806
|
-
response = {
|
|
807
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
808
|
-
name: errorCode,
|
|
809
|
-
$metadata: deserializeMetadata(output),
|
|
810
|
-
};
|
|
811
|
-
break;
|
|
812
|
-
case "InternalServerException":
|
|
813
|
-
case "com.amazonaws.voiceid#InternalServerException":
|
|
814
|
-
response = {
|
|
815
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
816
|
-
name: errorCode,
|
|
817
|
-
$metadata: deserializeMetadata(output),
|
|
818
|
-
};
|
|
819
|
-
break;
|
|
820
|
-
case "ResourceNotFoundException":
|
|
821
|
-
case "com.amazonaws.voiceid#ResourceNotFoundException":
|
|
822
|
-
response = {
|
|
823
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
824
|
-
name: errorCode,
|
|
825
|
-
$metadata: deserializeMetadata(output),
|
|
826
|
-
};
|
|
827
|
-
break;
|
|
828
|
-
case "ThrottlingException":
|
|
829
|
-
case "com.amazonaws.voiceid#ThrottlingException":
|
|
830
|
-
response = {
|
|
831
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
832
|
-
name: errorCode,
|
|
833
|
-
$metadata: deserializeMetadata(output),
|
|
834
|
-
};
|
|
835
|
-
break;
|
|
836
|
-
case "ValidationException":
|
|
837
|
-
case "com.amazonaws.voiceid#ValidationException":
|
|
838
|
-
response = {
|
|
839
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
840
|
-
name: errorCode,
|
|
841
|
-
$metadata: deserializeMetadata(output),
|
|
842
|
-
};
|
|
843
|
-
break;
|
|
844
|
-
default:
|
|
845
|
-
const parsedBody = parsedOutput.body;
|
|
846
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
847
|
-
response = {
|
|
848
|
-
...parsedBody,
|
|
849
|
-
name: `${errorCode}`,
|
|
850
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
851
|
-
$fault: "client",
|
|
852
|
-
$metadata: deserializeMetadata(output),
|
|
853
|
-
} as any;
|
|
854
|
-
}
|
|
855
|
-
const message = response.message || response.Message || errorCode;
|
|
856
|
-
response.message = message;
|
|
857
|
-
delete response.Message;
|
|
858
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
859
|
-
};
|
|
860
|
-
|
|
861
|
-
export const deserializeAws_json1_0DescribeFraudsterCommand = async (
|
|
862
|
-
output: __HttpResponse,
|
|
863
|
-
context: __SerdeContext
|
|
864
|
-
): Promise<DescribeFraudsterCommandOutput> => {
|
|
865
|
-
if (output.statusCode >= 300) {
|
|
866
|
-
return deserializeAws_json1_0DescribeFraudsterCommandError(output, context);
|
|
867
|
-
}
|
|
868
|
-
const data: any = await parseBody(output.body, context);
|
|
869
|
-
let contents: any = {};
|
|
870
|
-
contents = deserializeAws_json1_0DescribeFraudsterResponse(data, context);
|
|
871
|
-
const response: DescribeFraudsterCommandOutput = {
|
|
872
|
-
$metadata: deserializeMetadata(output),
|
|
873
|
-
...contents,
|
|
874
|
-
};
|
|
875
|
-
return Promise.resolve(response);
|
|
876
|
-
};
|
|
877
|
-
|
|
878
|
-
const deserializeAws_json1_0DescribeFraudsterCommandError = async (
|
|
879
|
-
output: __HttpResponse,
|
|
880
|
-
context: __SerdeContext
|
|
881
|
-
): Promise<DescribeFraudsterCommandOutput> => {
|
|
882
|
-
const parsedOutput: any = {
|
|
883
|
-
...output,
|
|
884
|
-
body: await parseBody(output.body, context),
|
|
885
|
-
};
|
|
886
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
887
|
-
let errorCode = "UnknownError";
|
|
888
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
889
|
-
switch (errorCode) {
|
|
890
|
-
case "AccessDeniedException":
|
|
891
|
-
case "com.amazonaws.voiceid#AccessDeniedException":
|
|
892
|
-
response = {
|
|
893
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
894
|
-
name: errorCode,
|
|
895
|
-
$metadata: deserializeMetadata(output),
|
|
896
|
-
};
|
|
897
|
-
break;
|
|
898
|
-
case "InternalServerException":
|
|
899
|
-
case "com.amazonaws.voiceid#InternalServerException":
|
|
900
|
-
response = {
|
|
901
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
902
|
-
name: errorCode,
|
|
903
|
-
$metadata: deserializeMetadata(output),
|
|
904
|
-
};
|
|
905
|
-
break;
|
|
906
|
-
case "ResourceNotFoundException":
|
|
907
|
-
case "com.amazonaws.voiceid#ResourceNotFoundException":
|
|
908
|
-
response = {
|
|
909
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
910
|
-
name: errorCode,
|
|
911
|
-
$metadata: deserializeMetadata(output),
|
|
912
|
-
};
|
|
913
|
-
break;
|
|
914
|
-
case "ThrottlingException":
|
|
915
|
-
case "com.amazonaws.voiceid#ThrottlingException":
|
|
916
|
-
response = {
|
|
917
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
918
|
-
name: errorCode,
|
|
919
|
-
$metadata: deserializeMetadata(output),
|
|
920
|
-
};
|
|
921
|
-
break;
|
|
922
|
-
case "ValidationException":
|
|
923
|
-
case "com.amazonaws.voiceid#ValidationException":
|
|
924
|
-
response = {
|
|
925
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
926
|
-
name: errorCode,
|
|
927
|
-
$metadata: deserializeMetadata(output),
|
|
928
|
-
};
|
|
929
|
-
break;
|
|
930
|
-
default:
|
|
931
|
-
const parsedBody = parsedOutput.body;
|
|
932
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
933
|
-
response = {
|
|
934
|
-
...parsedBody,
|
|
935
|
-
name: `${errorCode}`,
|
|
936
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
937
|
-
$fault: "client",
|
|
938
|
-
$metadata: deserializeMetadata(output),
|
|
939
|
-
} as any;
|
|
940
|
-
}
|
|
941
|
-
const message = response.message || response.Message || errorCode;
|
|
942
|
-
response.message = message;
|
|
943
|
-
delete response.Message;
|
|
944
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
945
|
-
};
|
|
946
|
-
|
|
947
|
-
export const deserializeAws_json1_0DescribeFraudsterRegistrationJobCommand = async (
|
|
948
|
-
output: __HttpResponse,
|
|
949
|
-
context: __SerdeContext
|
|
950
|
-
): Promise<DescribeFraudsterRegistrationJobCommandOutput> => {
|
|
951
|
-
if (output.statusCode >= 300) {
|
|
952
|
-
return deserializeAws_json1_0DescribeFraudsterRegistrationJobCommandError(output, context);
|
|
953
|
-
}
|
|
954
|
-
const data: any = await parseBody(output.body, context);
|
|
955
|
-
let contents: any = {};
|
|
956
|
-
contents = deserializeAws_json1_0DescribeFraudsterRegistrationJobResponse(data, context);
|
|
957
|
-
const response: DescribeFraudsterRegistrationJobCommandOutput = {
|
|
958
|
-
$metadata: deserializeMetadata(output),
|
|
959
|
-
...contents,
|
|
960
|
-
};
|
|
961
|
-
return Promise.resolve(response);
|
|
962
|
-
};
|
|
963
|
-
|
|
964
|
-
const deserializeAws_json1_0DescribeFraudsterRegistrationJobCommandError = async (
|
|
965
|
-
output: __HttpResponse,
|
|
966
|
-
context: __SerdeContext
|
|
967
|
-
): Promise<DescribeFraudsterRegistrationJobCommandOutput> => {
|
|
968
|
-
const parsedOutput: any = {
|
|
969
|
-
...output,
|
|
970
|
-
body: await parseBody(output.body, context),
|
|
971
|
-
};
|
|
972
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
973
|
-
let errorCode = "UnknownError";
|
|
974
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
975
|
-
switch (errorCode) {
|
|
976
|
-
case "AccessDeniedException":
|
|
977
|
-
case "com.amazonaws.voiceid#AccessDeniedException":
|
|
978
|
-
response = {
|
|
979
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
980
|
-
name: errorCode,
|
|
981
|
-
$metadata: deserializeMetadata(output),
|
|
982
|
-
};
|
|
983
|
-
break;
|
|
984
|
-
case "InternalServerException":
|
|
985
|
-
case "com.amazonaws.voiceid#InternalServerException":
|
|
986
|
-
response = {
|
|
987
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
988
|
-
name: errorCode,
|
|
989
|
-
$metadata: deserializeMetadata(output),
|
|
990
|
-
};
|
|
991
|
-
break;
|
|
992
|
-
case "ResourceNotFoundException":
|
|
993
|
-
case "com.amazonaws.voiceid#ResourceNotFoundException":
|
|
994
|
-
response = {
|
|
995
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
996
|
-
name: errorCode,
|
|
997
|
-
$metadata: deserializeMetadata(output),
|
|
998
|
-
};
|
|
999
|
-
break;
|
|
1000
|
-
case "ThrottlingException":
|
|
1001
|
-
case "com.amazonaws.voiceid#ThrottlingException":
|
|
1002
|
-
response = {
|
|
1003
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1004
|
-
name: errorCode,
|
|
1005
|
-
$metadata: deserializeMetadata(output),
|
|
1006
|
-
};
|
|
1007
|
-
break;
|
|
1008
|
-
case "ValidationException":
|
|
1009
|
-
case "com.amazonaws.voiceid#ValidationException":
|
|
1010
|
-
response = {
|
|
1011
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
1012
|
-
name: errorCode,
|
|
1013
|
-
$metadata: deserializeMetadata(output),
|
|
1014
|
-
};
|
|
1015
|
-
break;
|
|
1016
|
-
default:
|
|
1017
|
-
const parsedBody = parsedOutput.body;
|
|
1018
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1019
|
-
response = {
|
|
1020
|
-
...parsedBody,
|
|
1021
|
-
name: `${errorCode}`,
|
|
1022
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1023
|
-
$fault: "client",
|
|
1024
|
-
$metadata: deserializeMetadata(output),
|
|
1025
|
-
} as any;
|
|
1026
|
-
}
|
|
1027
|
-
const message = response.message || response.Message || errorCode;
|
|
1028
|
-
response.message = message;
|
|
1029
|
-
delete response.Message;
|
|
1030
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1031
|
-
};
|
|
1032
|
-
|
|
1033
|
-
export const deserializeAws_json1_0DescribeSpeakerCommand = async (
|
|
1034
|
-
output: __HttpResponse,
|
|
1035
|
-
context: __SerdeContext
|
|
1036
|
-
): Promise<DescribeSpeakerCommandOutput> => {
|
|
1037
|
-
if (output.statusCode >= 300) {
|
|
1038
|
-
return deserializeAws_json1_0DescribeSpeakerCommandError(output, context);
|
|
1039
|
-
}
|
|
1040
|
-
const data: any = await parseBody(output.body, context);
|
|
1041
|
-
let contents: any = {};
|
|
1042
|
-
contents = deserializeAws_json1_0DescribeSpeakerResponse(data, context);
|
|
1043
|
-
const response: DescribeSpeakerCommandOutput = {
|
|
1044
|
-
$metadata: deserializeMetadata(output),
|
|
1045
|
-
...contents,
|
|
1046
|
-
};
|
|
1047
|
-
return Promise.resolve(response);
|
|
1048
|
-
};
|
|
1049
|
-
|
|
1050
|
-
const deserializeAws_json1_0DescribeSpeakerCommandError = async (
|
|
1051
|
-
output: __HttpResponse,
|
|
1052
|
-
context: __SerdeContext
|
|
1053
|
-
): Promise<DescribeSpeakerCommandOutput> => {
|
|
1054
|
-
const parsedOutput: any = {
|
|
1055
|
-
...output,
|
|
1056
|
-
body: await parseBody(output.body, context),
|
|
1057
|
-
};
|
|
1058
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1059
|
-
let errorCode = "UnknownError";
|
|
1060
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1061
|
-
switch (errorCode) {
|
|
1062
|
-
case "AccessDeniedException":
|
|
1063
|
-
case "com.amazonaws.voiceid#AccessDeniedException":
|
|
1064
|
-
response = {
|
|
1065
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1066
|
-
name: errorCode,
|
|
1067
|
-
$metadata: deserializeMetadata(output),
|
|
1068
|
-
};
|
|
1069
|
-
break;
|
|
1070
|
-
case "InternalServerException":
|
|
1071
|
-
case "com.amazonaws.voiceid#InternalServerException":
|
|
1072
|
-
response = {
|
|
1073
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
1074
|
-
name: errorCode,
|
|
1075
|
-
$metadata: deserializeMetadata(output),
|
|
1076
|
-
};
|
|
1077
|
-
break;
|
|
1078
|
-
case "ResourceNotFoundException":
|
|
1079
|
-
case "com.amazonaws.voiceid#ResourceNotFoundException":
|
|
1080
|
-
response = {
|
|
1081
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1082
|
-
name: errorCode,
|
|
1083
|
-
$metadata: deserializeMetadata(output),
|
|
1084
|
-
};
|
|
1085
|
-
break;
|
|
1086
|
-
case "ThrottlingException":
|
|
1087
|
-
case "com.amazonaws.voiceid#ThrottlingException":
|
|
1088
|
-
response = {
|
|
1089
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1090
|
-
name: errorCode,
|
|
1091
|
-
$metadata: deserializeMetadata(output),
|
|
1092
|
-
};
|
|
1093
|
-
break;
|
|
1094
|
-
case "ValidationException":
|
|
1095
|
-
case "com.amazonaws.voiceid#ValidationException":
|
|
1096
|
-
response = {
|
|
1097
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
1098
|
-
name: errorCode,
|
|
1099
|
-
$metadata: deserializeMetadata(output),
|
|
1100
|
-
};
|
|
1101
|
-
break;
|
|
1102
|
-
default:
|
|
1103
|
-
const parsedBody = parsedOutput.body;
|
|
1104
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1105
|
-
response = {
|
|
1106
|
-
...parsedBody,
|
|
1107
|
-
name: `${errorCode}`,
|
|
1108
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1109
|
-
$fault: "client",
|
|
1110
|
-
$metadata: deserializeMetadata(output),
|
|
1111
|
-
} as any;
|
|
1112
|
-
}
|
|
1113
|
-
const message = response.message || response.Message || errorCode;
|
|
1114
|
-
response.message = message;
|
|
1115
|
-
delete response.Message;
|
|
1116
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1117
|
-
};
|
|
1118
|
-
|
|
1119
|
-
export const deserializeAws_json1_0DescribeSpeakerEnrollmentJobCommand = async (
|
|
1120
|
-
output: __HttpResponse,
|
|
1121
|
-
context: __SerdeContext
|
|
1122
|
-
): Promise<DescribeSpeakerEnrollmentJobCommandOutput> => {
|
|
1123
|
-
if (output.statusCode >= 300) {
|
|
1124
|
-
return deserializeAws_json1_0DescribeSpeakerEnrollmentJobCommandError(output, context);
|
|
1125
|
-
}
|
|
1126
|
-
const data: any = await parseBody(output.body, context);
|
|
1127
|
-
let contents: any = {};
|
|
1128
|
-
contents = deserializeAws_json1_0DescribeSpeakerEnrollmentJobResponse(data, context);
|
|
1129
|
-
const response: DescribeSpeakerEnrollmentJobCommandOutput = {
|
|
1130
|
-
$metadata: deserializeMetadata(output),
|
|
1131
|
-
...contents,
|
|
1132
|
-
};
|
|
1133
|
-
return Promise.resolve(response);
|
|
1134
|
-
};
|
|
1135
|
-
|
|
1136
|
-
const deserializeAws_json1_0DescribeSpeakerEnrollmentJobCommandError = async (
|
|
1137
|
-
output: __HttpResponse,
|
|
1138
|
-
context: __SerdeContext
|
|
1139
|
-
): Promise<DescribeSpeakerEnrollmentJobCommandOutput> => {
|
|
1140
|
-
const parsedOutput: any = {
|
|
1141
|
-
...output,
|
|
1142
|
-
body: await parseBody(output.body, context),
|
|
1143
|
-
};
|
|
1144
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1145
|
-
let errorCode = "UnknownError";
|
|
1146
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1147
|
-
switch (errorCode) {
|
|
1148
|
-
case "AccessDeniedException":
|
|
1149
|
-
case "com.amazonaws.voiceid#AccessDeniedException":
|
|
1150
|
-
response = {
|
|
1151
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1152
|
-
name: errorCode,
|
|
1153
|
-
$metadata: deserializeMetadata(output),
|
|
1154
|
-
};
|
|
1155
|
-
break;
|
|
1156
|
-
case "InternalServerException":
|
|
1157
|
-
case "com.amazonaws.voiceid#InternalServerException":
|
|
1158
|
-
response = {
|
|
1159
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
1160
|
-
name: errorCode,
|
|
1161
|
-
$metadata: deserializeMetadata(output),
|
|
1162
|
-
};
|
|
1163
|
-
break;
|
|
1164
|
-
case "ResourceNotFoundException":
|
|
1165
|
-
case "com.amazonaws.voiceid#ResourceNotFoundException":
|
|
1166
|
-
response = {
|
|
1167
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1168
|
-
name: errorCode,
|
|
1169
|
-
$metadata: deserializeMetadata(output),
|
|
1170
|
-
};
|
|
1171
|
-
break;
|
|
1172
|
-
case "ThrottlingException":
|
|
1173
|
-
case "com.amazonaws.voiceid#ThrottlingException":
|
|
1174
|
-
response = {
|
|
1175
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1176
|
-
name: errorCode,
|
|
1177
|
-
$metadata: deserializeMetadata(output),
|
|
1178
|
-
};
|
|
1179
|
-
break;
|
|
1180
|
-
case "ValidationException":
|
|
1181
|
-
case "com.amazonaws.voiceid#ValidationException":
|
|
1182
|
-
response = {
|
|
1183
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
1184
|
-
name: errorCode,
|
|
1185
|
-
$metadata: deserializeMetadata(output),
|
|
1186
|
-
};
|
|
1187
|
-
break;
|
|
1188
|
-
default:
|
|
1189
|
-
const parsedBody = parsedOutput.body;
|
|
1190
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1191
|
-
response = {
|
|
1192
|
-
...parsedBody,
|
|
1193
|
-
name: `${errorCode}`,
|
|
1194
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1195
|
-
$fault: "client",
|
|
1196
|
-
$metadata: deserializeMetadata(output),
|
|
1197
|
-
} as any;
|
|
1198
|
-
}
|
|
1199
|
-
const message = response.message || response.Message || errorCode;
|
|
1200
|
-
response.message = message;
|
|
1201
|
-
delete response.Message;
|
|
1202
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1203
|
-
};
|
|
1204
|
-
|
|
1205
|
-
export const deserializeAws_json1_0EvaluateSessionCommand = async (
|
|
1206
|
-
output: __HttpResponse,
|
|
1207
|
-
context: __SerdeContext
|
|
1208
|
-
): Promise<EvaluateSessionCommandOutput> => {
|
|
1209
|
-
if (output.statusCode >= 300) {
|
|
1210
|
-
return deserializeAws_json1_0EvaluateSessionCommandError(output, context);
|
|
1211
|
-
}
|
|
1212
|
-
const data: any = await parseBody(output.body, context);
|
|
1213
|
-
let contents: any = {};
|
|
1214
|
-
contents = deserializeAws_json1_0EvaluateSessionResponse(data, context);
|
|
1215
|
-
const response: EvaluateSessionCommandOutput = {
|
|
1216
|
-
$metadata: deserializeMetadata(output),
|
|
1217
|
-
...contents,
|
|
1218
|
-
};
|
|
1219
|
-
return Promise.resolve(response);
|
|
1220
|
-
};
|
|
1221
|
-
|
|
1222
|
-
const deserializeAws_json1_0EvaluateSessionCommandError = async (
|
|
1223
|
-
output: __HttpResponse,
|
|
1224
|
-
context: __SerdeContext
|
|
1225
|
-
): Promise<EvaluateSessionCommandOutput> => {
|
|
1226
|
-
const parsedOutput: any = {
|
|
1227
|
-
...output,
|
|
1228
|
-
body: await parseBody(output.body, context),
|
|
1229
|
-
};
|
|
1230
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1231
|
-
let errorCode = "UnknownError";
|
|
1232
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1233
|
-
switch (errorCode) {
|
|
1234
|
-
case "AccessDeniedException":
|
|
1235
|
-
case "com.amazonaws.voiceid#AccessDeniedException":
|
|
1236
|
-
response = {
|
|
1237
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1238
|
-
name: errorCode,
|
|
1239
|
-
$metadata: deserializeMetadata(output),
|
|
1240
|
-
};
|
|
1241
|
-
break;
|
|
1242
|
-
case "InternalServerException":
|
|
1243
|
-
case "com.amazonaws.voiceid#InternalServerException":
|
|
1244
|
-
response = {
|
|
1245
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
1246
|
-
name: errorCode,
|
|
1247
|
-
$metadata: deserializeMetadata(output),
|
|
1248
|
-
};
|
|
1249
|
-
break;
|
|
1250
|
-
case "ResourceNotFoundException":
|
|
1251
|
-
case "com.amazonaws.voiceid#ResourceNotFoundException":
|
|
1252
|
-
response = {
|
|
1253
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1254
|
-
name: errorCode,
|
|
1255
|
-
$metadata: deserializeMetadata(output),
|
|
1256
|
-
};
|
|
1257
|
-
break;
|
|
1258
|
-
case "ThrottlingException":
|
|
1259
|
-
case "com.amazonaws.voiceid#ThrottlingException":
|
|
1260
|
-
response = {
|
|
1261
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1262
|
-
name: errorCode,
|
|
1263
|
-
$metadata: deserializeMetadata(output),
|
|
1264
|
-
};
|
|
1265
|
-
break;
|
|
1266
|
-
case "ValidationException":
|
|
1267
|
-
case "com.amazonaws.voiceid#ValidationException":
|
|
1268
|
-
response = {
|
|
1269
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
1270
|
-
name: errorCode,
|
|
1271
|
-
$metadata: deserializeMetadata(output),
|
|
1272
|
-
};
|
|
1273
|
-
break;
|
|
1274
|
-
default:
|
|
1275
|
-
const parsedBody = parsedOutput.body;
|
|
1276
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1277
|
-
response = {
|
|
1278
|
-
...parsedBody,
|
|
1279
|
-
name: `${errorCode}`,
|
|
1280
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1281
|
-
$fault: "client",
|
|
1282
|
-
$metadata: deserializeMetadata(output),
|
|
1283
|
-
} as any;
|
|
1284
|
-
}
|
|
1285
|
-
const message = response.message || response.Message || errorCode;
|
|
1286
|
-
response.message = message;
|
|
1287
|
-
delete response.Message;
|
|
1288
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1289
|
-
};
|
|
1290
|
-
|
|
1291
|
-
export const deserializeAws_json1_0ListDomainsCommand = async (
|
|
1292
|
-
output: __HttpResponse,
|
|
1293
|
-
context: __SerdeContext
|
|
1294
|
-
): Promise<ListDomainsCommandOutput> => {
|
|
1295
|
-
if (output.statusCode >= 300) {
|
|
1296
|
-
return deserializeAws_json1_0ListDomainsCommandError(output, context);
|
|
1297
|
-
}
|
|
1298
|
-
const data: any = await parseBody(output.body, context);
|
|
1299
|
-
let contents: any = {};
|
|
1300
|
-
contents = deserializeAws_json1_0ListDomainsResponse(data, context);
|
|
1301
|
-
const response: ListDomainsCommandOutput = {
|
|
1302
|
-
$metadata: deserializeMetadata(output),
|
|
1303
|
-
...contents,
|
|
1304
|
-
};
|
|
1305
|
-
return Promise.resolve(response);
|
|
1306
|
-
};
|
|
1307
|
-
|
|
1308
|
-
const deserializeAws_json1_0ListDomainsCommandError = async (
|
|
1309
|
-
output: __HttpResponse,
|
|
1310
|
-
context: __SerdeContext
|
|
1311
|
-
): Promise<ListDomainsCommandOutput> => {
|
|
1312
|
-
const parsedOutput: any = {
|
|
1313
|
-
...output,
|
|
1314
|
-
body: await parseBody(output.body, context),
|
|
1315
|
-
};
|
|
1316
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1317
|
-
let errorCode = "UnknownError";
|
|
1318
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1319
|
-
switch (errorCode) {
|
|
1320
|
-
case "AccessDeniedException":
|
|
1321
|
-
case "com.amazonaws.voiceid#AccessDeniedException":
|
|
1322
|
-
response = {
|
|
1323
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1324
|
-
name: errorCode,
|
|
1325
|
-
$metadata: deserializeMetadata(output),
|
|
1326
|
-
};
|
|
1327
|
-
break;
|
|
1328
|
-
case "InternalServerException":
|
|
1329
|
-
case "com.amazonaws.voiceid#InternalServerException":
|
|
1330
|
-
response = {
|
|
1331
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
1332
|
-
name: errorCode,
|
|
1333
|
-
$metadata: deserializeMetadata(output),
|
|
1334
|
-
};
|
|
1335
|
-
break;
|
|
1336
|
-
case "ThrottlingException":
|
|
1337
|
-
case "com.amazonaws.voiceid#ThrottlingException":
|
|
1338
|
-
response = {
|
|
1339
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1340
|
-
name: errorCode,
|
|
1341
|
-
$metadata: deserializeMetadata(output),
|
|
1342
|
-
};
|
|
1343
|
-
break;
|
|
1344
|
-
case "ValidationException":
|
|
1345
|
-
case "com.amazonaws.voiceid#ValidationException":
|
|
1346
|
-
response = {
|
|
1347
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
1348
|
-
name: errorCode,
|
|
1349
|
-
$metadata: deserializeMetadata(output),
|
|
1350
|
-
};
|
|
1351
|
-
break;
|
|
1352
|
-
default:
|
|
1353
|
-
const parsedBody = parsedOutput.body;
|
|
1354
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1355
|
-
response = {
|
|
1356
|
-
...parsedBody,
|
|
1357
|
-
name: `${errorCode}`,
|
|
1358
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1359
|
-
$fault: "client",
|
|
1360
|
-
$metadata: deserializeMetadata(output),
|
|
1361
|
-
} as any;
|
|
1362
|
-
}
|
|
1363
|
-
const message = response.message || response.Message || errorCode;
|
|
1364
|
-
response.message = message;
|
|
1365
|
-
delete response.Message;
|
|
1366
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1367
|
-
};
|
|
1368
|
-
|
|
1369
|
-
export const deserializeAws_json1_0ListFraudsterRegistrationJobsCommand = async (
|
|
1370
|
-
output: __HttpResponse,
|
|
1371
|
-
context: __SerdeContext
|
|
1372
|
-
): Promise<ListFraudsterRegistrationJobsCommandOutput> => {
|
|
1373
|
-
if (output.statusCode >= 300) {
|
|
1374
|
-
return deserializeAws_json1_0ListFraudsterRegistrationJobsCommandError(output, context);
|
|
1375
|
-
}
|
|
1376
|
-
const data: any = await parseBody(output.body, context);
|
|
1377
|
-
let contents: any = {};
|
|
1378
|
-
contents = deserializeAws_json1_0ListFraudsterRegistrationJobsResponse(data, context);
|
|
1379
|
-
const response: ListFraudsterRegistrationJobsCommandOutput = {
|
|
1380
|
-
$metadata: deserializeMetadata(output),
|
|
1381
|
-
...contents,
|
|
1382
|
-
};
|
|
1383
|
-
return Promise.resolve(response);
|
|
1384
|
-
};
|
|
1385
|
-
|
|
1386
|
-
const deserializeAws_json1_0ListFraudsterRegistrationJobsCommandError = async (
|
|
1387
|
-
output: __HttpResponse,
|
|
1388
|
-
context: __SerdeContext
|
|
1389
|
-
): Promise<ListFraudsterRegistrationJobsCommandOutput> => {
|
|
1390
|
-
const parsedOutput: any = {
|
|
1391
|
-
...output,
|
|
1392
|
-
body: await parseBody(output.body, context),
|
|
1393
|
-
};
|
|
1394
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1395
|
-
let errorCode = "UnknownError";
|
|
1396
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1397
|
-
switch (errorCode) {
|
|
1398
|
-
case "AccessDeniedException":
|
|
1399
|
-
case "com.amazonaws.voiceid#AccessDeniedException":
|
|
1400
|
-
response = {
|
|
1401
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1402
|
-
name: errorCode,
|
|
1403
|
-
$metadata: deserializeMetadata(output),
|
|
1404
|
-
};
|
|
1405
|
-
break;
|
|
1406
|
-
case "InternalServerException":
|
|
1407
|
-
case "com.amazonaws.voiceid#InternalServerException":
|
|
1408
|
-
response = {
|
|
1409
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
1410
|
-
name: errorCode,
|
|
1411
|
-
$metadata: deserializeMetadata(output),
|
|
1412
|
-
};
|
|
1413
|
-
break;
|
|
1414
|
-
case "ResourceNotFoundException":
|
|
1415
|
-
case "com.amazonaws.voiceid#ResourceNotFoundException":
|
|
1416
|
-
response = {
|
|
1417
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1418
|
-
name: errorCode,
|
|
1419
|
-
$metadata: deserializeMetadata(output),
|
|
1420
|
-
};
|
|
1421
|
-
break;
|
|
1422
|
-
case "ThrottlingException":
|
|
1423
|
-
case "com.amazonaws.voiceid#ThrottlingException":
|
|
1424
|
-
response = {
|
|
1425
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1426
|
-
name: errorCode,
|
|
1427
|
-
$metadata: deserializeMetadata(output),
|
|
1428
|
-
};
|
|
1429
|
-
break;
|
|
1430
|
-
case "ValidationException":
|
|
1431
|
-
case "com.amazonaws.voiceid#ValidationException":
|
|
1432
|
-
response = {
|
|
1433
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
1434
|
-
name: errorCode,
|
|
1435
|
-
$metadata: deserializeMetadata(output),
|
|
1436
|
-
};
|
|
1437
|
-
break;
|
|
1438
|
-
default:
|
|
1439
|
-
const parsedBody = parsedOutput.body;
|
|
1440
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1441
|
-
response = {
|
|
1442
|
-
...parsedBody,
|
|
1443
|
-
name: `${errorCode}`,
|
|
1444
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1445
|
-
$fault: "client",
|
|
1446
|
-
$metadata: deserializeMetadata(output),
|
|
1447
|
-
} as any;
|
|
1448
|
-
}
|
|
1449
|
-
const message = response.message || response.Message || errorCode;
|
|
1450
|
-
response.message = message;
|
|
1451
|
-
delete response.Message;
|
|
1452
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1453
|
-
};
|
|
1454
|
-
|
|
1455
|
-
export const deserializeAws_json1_0ListSpeakerEnrollmentJobsCommand = async (
|
|
1456
|
-
output: __HttpResponse,
|
|
1457
|
-
context: __SerdeContext
|
|
1458
|
-
): Promise<ListSpeakerEnrollmentJobsCommandOutput> => {
|
|
1459
|
-
if (output.statusCode >= 300) {
|
|
1460
|
-
return deserializeAws_json1_0ListSpeakerEnrollmentJobsCommandError(output, context);
|
|
1461
|
-
}
|
|
1462
|
-
const data: any = await parseBody(output.body, context);
|
|
1463
|
-
let contents: any = {};
|
|
1464
|
-
contents = deserializeAws_json1_0ListSpeakerEnrollmentJobsResponse(data, context);
|
|
1465
|
-
const response: ListSpeakerEnrollmentJobsCommandOutput = {
|
|
1466
|
-
$metadata: deserializeMetadata(output),
|
|
1467
|
-
...contents,
|
|
1468
|
-
};
|
|
1469
|
-
return Promise.resolve(response);
|
|
1470
|
-
};
|
|
1471
|
-
|
|
1472
|
-
const deserializeAws_json1_0ListSpeakerEnrollmentJobsCommandError = async (
|
|
1473
|
-
output: __HttpResponse,
|
|
1474
|
-
context: __SerdeContext
|
|
1475
|
-
): Promise<ListSpeakerEnrollmentJobsCommandOutput> => {
|
|
1476
|
-
const parsedOutput: any = {
|
|
1477
|
-
...output,
|
|
1478
|
-
body: await parseBody(output.body, context),
|
|
1479
|
-
};
|
|
1480
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1481
|
-
let errorCode = "UnknownError";
|
|
1482
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1483
|
-
switch (errorCode) {
|
|
1484
|
-
case "AccessDeniedException":
|
|
1485
|
-
case "com.amazonaws.voiceid#AccessDeniedException":
|
|
1486
|
-
response = {
|
|
1487
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1488
|
-
name: errorCode,
|
|
1489
|
-
$metadata: deserializeMetadata(output),
|
|
1490
|
-
};
|
|
1491
|
-
break;
|
|
1492
|
-
case "InternalServerException":
|
|
1493
|
-
case "com.amazonaws.voiceid#InternalServerException":
|
|
1494
|
-
response = {
|
|
1495
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
1496
|
-
name: errorCode,
|
|
1497
|
-
$metadata: deserializeMetadata(output),
|
|
1498
|
-
};
|
|
1499
|
-
break;
|
|
1500
|
-
case "ResourceNotFoundException":
|
|
1501
|
-
case "com.amazonaws.voiceid#ResourceNotFoundException":
|
|
1502
|
-
response = {
|
|
1503
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1504
|
-
name: errorCode,
|
|
1505
|
-
$metadata: deserializeMetadata(output),
|
|
1506
|
-
};
|
|
1507
|
-
break;
|
|
1508
|
-
case "ThrottlingException":
|
|
1509
|
-
case "com.amazonaws.voiceid#ThrottlingException":
|
|
1510
|
-
response = {
|
|
1511
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1512
|
-
name: errorCode,
|
|
1513
|
-
$metadata: deserializeMetadata(output),
|
|
1514
|
-
};
|
|
1515
|
-
break;
|
|
1516
|
-
case "ValidationException":
|
|
1517
|
-
case "com.amazonaws.voiceid#ValidationException":
|
|
1518
|
-
response = {
|
|
1519
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
1520
|
-
name: errorCode,
|
|
1521
|
-
$metadata: deserializeMetadata(output),
|
|
1522
|
-
};
|
|
1523
|
-
break;
|
|
1524
|
-
default:
|
|
1525
|
-
const parsedBody = parsedOutput.body;
|
|
1526
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1527
|
-
response = {
|
|
1528
|
-
...parsedBody,
|
|
1529
|
-
name: `${errorCode}`,
|
|
1530
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1531
|
-
$fault: "client",
|
|
1532
|
-
$metadata: deserializeMetadata(output),
|
|
1533
|
-
} as any;
|
|
1534
|
-
}
|
|
1535
|
-
const message = response.message || response.Message || errorCode;
|
|
1536
|
-
response.message = message;
|
|
1537
|
-
delete response.Message;
|
|
1538
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1539
|
-
};
|
|
1540
|
-
|
|
1541
|
-
export const deserializeAws_json1_0ListSpeakersCommand = async (
|
|
1542
|
-
output: __HttpResponse,
|
|
1543
|
-
context: __SerdeContext
|
|
1544
|
-
): Promise<ListSpeakersCommandOutput> => {
|
|
1545
|
-
if (output.statusCode >= 300) {
|
|
1546
|
-
return deserializeAws_json1_0ListSpeakersCommandError(output, context);
|
|
1547
|
-
}
|
|
1548
|
-
const data: any = await parseBody(output.body, context);
|
|
1549
|
-
let contents: any = {};
|
|
1550
|
-
contents = deserializeAws_json1_0ListSpeakersResponse(data, context);
|
|
1551
|
-
const response: ListSpeakersCommandOutput = {
|
|
1552
|
-
$metadata: deserializeMetadata(output),
|
|
1553
|
-
...contents,
|
|
1554
|
-
};
|
|
1555
|
-
return Promise.resolve(response);
|
|
1556
|
-
};
|
|
1557
|
-
|
|
1558
|
-
const deserializeAws_json1_0ListSpeakersCommandError = async (
|
|
1559
|
-
output: __HttpResponse,
|
|
1560
|
-
context: __SerdeContext
|
|
1561
|
-
): Promise<ListSpeakersCommandOutput> => {
|
|
1562
|
-
const parsedOutput: any = {
|
|
1563
|
-
...output,
|
|
1564
|
-
body: await parseBody(output.body, context),
|
|
1565
|
-
};
|
|
1566
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1567
|
-
let errorCode = "UnknownError";
|
|
1568
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1569
|
-
switch (errorCode) {
|
|
1570
|
-
case "AccessDeniedException":
|
|
1571
|
-
case "com.amazonaws.voiceid#AccessDeniedException":
|
|
1572
|
-
response = {
|
|
1573
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1574
|
-
name: errorCode,
|
|
1575
|
-
$metadata: deserializeMetadata(output),
|
|
1576
|
-
};
|
|
1577
|
-
break;
|
|
1578
|
-
case "InternalServerException":
|
|
1579
|
-
case "com.amazonaws.voiceid#InternalServerException":
|
|
1580
|
-
response = {
|
|
1581
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
1582
|
-
name: errorCode,
|
|
1583
|
-
$metadata: deserializeMetadata(output),
|
|
1584
|
-
};
|
|
1585
|
-
break;
|
|
1586
|
-
case "ResourceNotFoundException":
|
|
1587
|
-
case "com.amazonaws.voiceid#ResourceNotFoundException":
|
|
1588
|
-
response = {
|
|
1589
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1590
|
-
name: errorCode,
|
|
1591
|
-
$metadata: deserializeMetadata(output),
|
|
1592
|
-
};
|
|
1593
|
-
break;
|
|
1594
|
-
case "ThrottlingException":
|
|
1595
|
-
case "com.amazonaws.voiceid#ThrottlingException":
|
|
1596
|
-
response = {
|
|
1597
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1598
|
-
name: errorCode,
|
|
1599
|
-
$metadata: deserializeMetadata(output),
|
|
1600
|
-
};
|
|
1601
|
-
break;
|
|
1602
|
-
case "ValidationException":
|
|
1603
|
-
case "com.amazonaws.voiceid#ValidationException":
|
|
1604
|
-
response = {
|
|
1605
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
1606
|
-
name: errorCode,
|
|
1607
|
-
$metadata: deserializeMetadata(output),
|
|
1608
|
-
};
|
|
1609
|
-
break;
|
|
1610
|
-
default:
|
|
1611
|
-
const parsedBody = parsedOutput.body;
|
|
1612
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1613
|
-
response = {
|
|
1614
|
-
...parsedBody,
|
|
1615
|
-
name: `${errorCode}`,
|
|
1616
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1617
|
-
$fault: "client",
|
|
1618
|
-
$metadata: deserializeMetadata(output),
|
|
1619
|
-
} as any;
|
|
1620
|
-
}
|
|
1621
|
-
const message = response.message || response.Message || errorCode;
|
|
1622
|
-
response.message = message;
|
|
1623
|
-
delete response.Message;
|
|
1624
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1625
|
-
};
|
|
1626
|
-
|
|
1627
|
-
export const deserializeAws_json1_0ListTagsForResourceCommand = async (
|
|
1628
|
-
output: __HttpResponse,
|
|
1629
|
-
context: __SerdeContext
|
|
1630
|
-
): Promise<ListTagsForResourceCommandOutput> => {
|
|
1631
|
-
if (output.statusCode >= 300) {
|
|
1632
|
-
return deserializeAws_json1_0ListTagsForResourceCommandError(output, context);
|
|
1633
|
-
}
|
|
1634
|
-
const data: any = await parseBody(output.body, context);
|
|
1635
|
-
let contents: any = {};
|
|
1636
|
-
contents = deserializeAws_json1_0ListTagsForResourceResponse(data, context);
|
|
1637
|
-
const response: ListTagsForResourceCommandOutput = {
|
|
1638
|
-
$metadata: deserializeMetadata(output),
|
|
1639
|
-
...contents,
|
|
1640
|
-
};
|
|
1641
|
-
return Promise.resolve(response);
|
|
1642
|
-
};
|
|
1643
|
-
|
|
1644
|
-
const deserializeAws_json1_0ListTagsForResourceCommandError = async (
|
|
1645
|
-
output: __HttpResponse,
|
|
1646
|
-
context: __SerdeContext
|
|
1647
|
-
): Promise<ListTagsForResourceCommandOutput> => {
|
|
1648
|
-
const parsedOutput: any = {
|
|
1649
|
-
...output,
|
|
1650
|
-
body: await parseBody(output.body, context),
|
|
1651
|
-
};
|
|
1652
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1653
|
-
let errorCode = "UnknownError";
|
|
1654
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1655
|
-
switch (errorCode) {
|
|
1656
|
-
case "AccessDeniedException":
|
|
1657
|
-
case "com.amazonaws.voiceid#AccessDeniedException":
|
|
1658
|
-
response = {
|
|
1659
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1660
|
-
name: errorCode,
|
|
1661
|
-
$metadata: deserializeMetadata(output),
|
|
1662
|
-
};
|
|
1663
|
-
break;
|
|
1664
|
-
case "InternalServerException":
|
|
1665
|
-
case "com.amazonaws.voiceid#InternalServerException":
|
|
1666
|
-
response = {
|
|
1667
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
1668
|
-
name: errorCode,
|
|
1669
|
-
$metadata: deserializeMetadata(output),
|
|
1670
|
-
};
|
|
1671
|
-
break;
|
|
1672
|
-
case "ResourceNotFoundException":
|
|
1673
|
-
case "com.amazonaws.voiceid#ResourceNotFoundException":
|
|
1674
|
-
response = {
|
|
1675
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1676
|
-
name: errorCode,
|
|
1677
|
-
$metadata: deserializeMetadata(output),
|
|
1678
|
-
};
|
|
1679
|
-
break;
|
|
1680
|
-
case "ThrottlingException":
|
|
1681
|
-
case "com.amazonaws.voiceid#ThrottlingException":
|
|
1682
|
-
response = {
|
|
1683
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1684
|
-
name: errorCode,
|
|
1685
|
-
$metadata: deserializeMetadata(output),
|
|
1686
|
-
};
|
|
1687
|
-
break;
|
|
1688
|
-
case "ValidationException":
|
|
1689
|
-
case "com.amazonaws.voiceid#ValidationException":
|
|
1690
|
-
response = {
|
|
1691
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
1692
|
-
name: errorCode,
|
|
1693
|
-
$metadata: deserializeMetadata(output),
|
|
1694
|
-
};
|
|
1695
|
-
break;
|
|
1696
|
-
default:
|
|
1697
|
-
const parsedBody = parsedOutput.body;
|
|
1698
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1699
|
-
response = {
|
|
1700
|
-
...parsedBody,
|
|
1701
|
-
name: `${errorCode}`,
|
|
1702
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1703
|
-
$fault: "client",
|
|
1704
|
-
$metadata: deserializeMetadata(output),
|
|
1705
|
-
} as any;
|
|
1706
|
-
}
|
|
1707
|
-
const message = response.message || response.Message || errorCode;
|
|
1708
|
-
response.message = message;
|
|
1709
|
-
delete response.Message;
|
|
1710
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1711
|
-
};
|
|
1712
|
-
|
|
1713
|
-
export const deserializeAws_json1_0OptOutSpeakerCommand = async (
|
|
1714
|
-
output: __HttpResponse,
|
|
1715
|
-
context: __SerdeContext
|
|
1716
|
-
): Promise<OptOutSpeakerCommandOutput> => {
|
|
1717
|
-
if (output.statusCode >= 300) {
|
|
1718
|
-
return deserializeAws_json1_0OptOutSpeakerCommandError(output, context);
|
|
1719
|
-
}
|
|
1720
|
-
const data: any = await parseBody(output.body, context);
|
|
1721
|
-
let contents: any = {};
|
|
1722
|
-
contents = deserializeAws_json1_0OptOutSpeakerResponse(data, context);
|
|
1723
|
-
const response: OptOutSpeakerCommandOutput = {
|
|
1724
|
-
$metadata: deserializeMetadata(output),
|
|
1725
|
-
...contents,
|
|
1726
|
-
};
|
|
1727
|
-
return Promise.resolve(response);
|
|
1728
|
-
};
|
|
1729
|
-
|
|
1730
|
-
const deserializeAws_json1_0OptOutSpeakerCommandError = async (
|
|
1731
|
-
output: __HttpResponse,
|
|
1732
|
-
context: __SerdeContext
|
|
1733
|
-
): Promise<OptOutSpeakerCommandOutput> => {
|
|
1734
|
-
const parsedOutput: any = {
|
|
1735
|
-
...output,
|
|
1736
|
-
body: await parseBody(output.body, context),
|
|
1737
|
-
};
|
|
1738
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1739
|
-
let errorCode = "UnknownError";
|
|
1740
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1741
|
-
switch (errorCode) {
|
|
1742
|
-
case "AccessDeniedException":
|
|
1743
|
-
case "com.amazonaws.voiceid#AccessDeniedException":
|
|
1744
|
-
response = {
|
|
1745
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1746
|
-
name: errorCode,
|
|
1747
|
-
$metadata: deserializeMetadata(output),
|
|
1748
|
-
};
|
|
1749
|
-
break;
|
|
1750
|
-
case "ConflictException":
|
|
1751
|
-
case "com.amazonaws.voiceid#ConflictException":
|
|
1752
|
-
response = {
|
|
1753
|
-
...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)),
|
|
1754
|
-
name: errorCode,
|
|
1755
|
-
$metadata: deserializeMetadata(output),
|
|
1756
|
-
};
|
|
1757
|
-
break;
|
|
1758
|
-
case "InternalServerException":
|
|
1759
|
-
case "com.amazonaws.voiceid#InternalServerException":
|
|
1760
|
-
response = {
|
|
1761
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
1762
|
-
name: errorCode,
|
|
1763
|
-
$metadata: deserializeMetadata(output),
|
|
1764
|
-
};
|
|
1765
|
-
break;
|
|
1766
|
-
case "ResourceNotFoundException":
|
|
1767
|
-
case "com.amazonaws.voiceid#ResourceNotFoundException":
|
|
1768
|
-
response = {
|
|
1769
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1770
|
-
name: errorCode,
|
|
1771
|
-
$metadata: deserializeMetadata(output),
|
|
1772
|
-
};
|
|
1773
|
-
break;
|
|
1774
|
-
case "ThrottlingException":
|
|
1775
|
-
case "com.amazonaws.voiceid#ThrottlingException":
|
|
1776
|
-
response = {
|
|
1777
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1778
|
-
name: errorCode,
|
|
1779
|
-
$metadata: deserializeMetadata(output),
|
|
1780
|
-
};
|
|
1781
|
-
break;
|
|
1782
|
-
case "ValidationException":
|
|
1783
|
-
case "com.amazonaws.voiceid#ValidationException":
|
|
1784
|
-
response = {
|
|
1785
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
1786
|
-
name: errorCode,
|
|
1787
|
-
$metadata: deserializeMetadata(output),
|
|
1788
|
-
};
|
|
1789
|
-
break;
|
|
1790
|
-
default:
|
|
1791
|
-
const parsedBody = parsedOutput.body;
|
|
1792
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1793
|
-
response = {
|
|
1794
|
-
...parsedBody,
|
|
1795
|
-
name: `${errorCode}`,
|
|
1796
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1797
|
-
$fault: "client",
|
|
1798
|
-
$metadata: deserializeMetadata(output),
|
|
1799
|
-
} as any;
|
|
1800
|
-
}
|
|
1801
|
-
const message = response.message || response.Message || errorCode;
|
|
1802
|
-
response.message = message;
|
|
1803
|
-
delete response.Message;
|
|
1804
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1805
|
-
};
|
|
1806
|
-
|
|
1807
|
-
export const deserializeAws_json1_0StartFraudsterRegistrationJobCommand = async (
|
|
1808
|
-
output: __HttpResponse,
|
|
1809
|
-
context: __SerdeContext
|
|
1810
|
-
): Promise<StartFraudsterRegistrationJobCommandOutput> => {
|
|
1811
|
-
if (output.statusCode >= 300) {
|
|
1812
|
-
return deserializeAws_json1_0StartFraudsterRegistrationJobCommandError(output, context);
|
|
1813
|
-
}
|
|
1814
|
-
const data: any = await parseBody(output.body, context);
|
|
1815
|
-
let contents: any = {};
|
|
1816
|
-
contents = deserializeAws_json1_0StartFraudsterRegistrationJobResponse(data, context);
|
|
1817
|
-
const response: StartFraudsterRegistrationJobCommandOutput = {
|
|
1818
|
-
$metadata: deserializeMetadata(output),
|
|
1819
|
-
...contents,
|
|
1820
|
-
};
|
|
1821
|
-
return Promise.resolve(response);
|
|
1822
|
-
};
|
|
1823
|
-
|
|
1824
|
-
const deserializeAws_json1_0StartFraudsterRegistrationJobCommandError = async (
|
|
1825
|
-
output: __HttpResponse,
|
|
1826
|
-
context: __SerdeContext
|
|
1827
|
-
): Promise<StartFraudsterRegistrationJobCommandOutput> => {
|
|
1828
|
-
const parsedOutput: any = {
|
|
1829
|
-
...output,
|
|
1830
|
-
body: await parseBody(output.body, context),
|
|
1831
|
-
};
|
|
1832
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1833
|
-
let errorCode = "UnknownError";
|
|
1834
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1835
|
-
switch (errorCode) {
|
|
1836
|
-
case "AccessDeniedException":
|
|
1837
|
-
case "com.amazonaws.voiceid#AccessDeniedException":
|
|
1838
|
-
response = {
|
|
1839
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1840
|
-
name: errorCode,
|
|
1841
|
-
$metadata: deserializeMetadata(output),
|
|
1842
|
-
};
|
|
1843
|
-
break;
|
|
1844
|
-
case "ConflictException":
|
|
1845
|
-
case "com.amazonaws.voiceid#ConflictException":
|
|
1846
|
-
response = {
|
|
1847
|
-
...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)),
|
|
1848
|
-
name: errorCode,
|
|
1849
|
-
$metadata: deserializeMetadata(output),
|
|
1850
|
-
};
|
|
1851
|
-
break;
|
|
1852
|
-
case "InternalServerException":
|
|
1853
|
-
case "com.amazonaws.voiceid#InternalServerException":
|
|
1854
|
-
response = {
|
|
1855
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
1856
|
-
name: errorCode,
|
|
1857
|
-
$metadata: deserializeMetadata(output),
|
|
1858
|
-
};
|
|
1859
|
-
break;
|
|
1860
|
-
case "ResourceNotFoundException":
|
|
1861
|
-
case "com.amazonaws.voiceid#ResourceNotFoundException":
|
|
1862
|
-
response = {
|
|
1863
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1864
|
-
name: errorCode,
|
|
1865
|
-
$metadata: deserializeMetadata(output),
|
|
1866
|
-
};
|
|
1867
|
-
break;
|
|
1868
|
-
case "ServiceQuotaExceededException":
|
|
1869
|
-
case "com.amazonaws.voiceid#ServiceQuotaExceededException":
|
|
1870
|
-
response = {
|
|
1871
|
-
...(await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
1872
|
-
name: errorCode,
|
|
1873
|
-
$metadata: deserializeMetadata(output),
|
|
1874
|
-
};
|
|
1875
|
-
break;
|
|
1876
|
-
case "ThrottlingException":
|
|
1877
|
-
case "com.amazonaws.voiceid#ThrottlingException":
|
|
1878
|
-
response = {
|
|
1879
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1880
|
-
name: errorCode,
|
|
1881
|
-
$metadata: deserializeMetadata(output),
|
|
1882
|
-
};
|
|
1883
|
-
break;
|
|
1884
|
-
case "ValidationException":
|
|
1885
|
-
case "com.amazonaws.voiceid#ValidationException":
|
|
1886
|
-
response = {
|
|
1887
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
1888
|
-
name: errorCode,
|
|
1889
|
-
$metadata: deserializeMetadata(output),
|
|
1890
|
-
};
|
|
1891
|
-
break;
|
|
1892
|
-
default:
|
|
1893
|
-
const parsedBody = parsedOutput.body;
|
|
1894
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1895
|
-
response = {
|
|
1896
|
-
...parsedBody,
|
|
1897
|
-
name: `${errorCode}`,
|
|
1898
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1899
|
-
$fault: "client",
|
|
1900
|
-
$metadata: deserializeMetadata(output),
|
|
1901
|
-
} as any;
|
|
1902
|
-
}
|
|
1903
|
-
const message = response.message || response.Message || errorCode;
|
|
1904
|
-
response.message = message;
|
|
1905
|
-
delete response.Message;
|
|
1906
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1907
|
-
};
|
|
1908
|
-
|
|
1909
|
-
export const deserializeAws_json1_0StartSpeakerEnrollmentJobCommand = async (
|
|
1910
|
-
output: __HttpResponse,
|
|
1911
|
-
context: __SerdeContext
|
|
1912
|
-
): Promise<StartSpeakerEnrollmentJobCommandOutput> => {
|
|
1913
|
-
if (output.statusCode >= 300) {
|
|
1914
|
-
return deserializeAws_json1_0StartSpeakerEnrollmentJobCommandError(output, context);
|
|
1915
|
-
}
|
|
1916
|
-
const data: any = await parseBody(output.body, context);
|
|
1917
|
-
let contents: any = {};
|
|
1918
|
-
contents = deserializeAws_json1_0StartSpeakerEnrollmentJobResponse(data, context);
|
|
1919
|
-
const response: StartSpeakerEnrollmentJobCommandOutput = {
|
|
1920
|
-
$metadata: deserializeMetadata(output),
|
|
1921
|
-
...contents,
|
|
1922
|
-
};
|
|
1923
|
-
return Promise.resolve(response);
|
|
1924
|
-
};
|
|
1925
|
-
|
|
1926
|
-
const deserializeAws_json1_0StartSpeakerEnrollmentJobCommandError = async (
|
|
1927
|
-
output: __HttpResponse,
|
|
1928
|
-
context: __SerdeContext
|
|
1929
|
-
): Promise<StartSpeakerEnrollmentJobCommandOutput> => {
|
|
1930
|
-
const parsedOutput: any = {
|
|
1931
|
-
...output,
|
|
1932
|
-
body: await parseBody(output.body, context),
|
|
1933
|
-
};
|
|
1934
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1935
|
-
let errorCode = "UnknownError";
|
|
1936
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1937
|
-
switch (errorCode) {
|
|
1938
|
-
case "AccessDeniedException":
|
|
1939
|
-
case "com.amazonaws.voiceid#AccessDeniedException":
|
|
1940
|
-
response = {
|
|
1941
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1942
|
-
name: errorCode,
|
|
1943
|
-
$metadata: deserializeMetadata(output),
|
|
1944
|
-
};
|
|
1945
|
-
break;
|
|
1946
|
-
case "ConflictException":
|
|
1947
|
-
case "com.amazonaws.voiceid#ConflictException":
|
|
1948
|
-
response = {
|
|
1949
|
-
...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)),
|
|
1950
|
-
name: errorCode,
|
|
1951
|
-
$metadata: deserializeMetadata(output),
|
|
1952
|
-
};
|
|
1953
|
-
break;
|
|
1954
|
-
case "InternalServerException":
|
|
1955
|
-
case "com.amazonaws.voiceid#InternalServerException":
|
|
1956
|
-
response = {
|
|
1957
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
1958
|
-
name: errorCode,
|
|
1959
|
-
$metadata: deserializeMetadata(output),
|
|
1960
|
-
};
|
|
1961
|
-
break;
|
|
1962
|
-
case "ResourceNotFoundException":
|
|
1963
|
-
case "com.amazonaws.voiceid#ResourceNotFoundException":
|
|
1964
|
-
response = {
|
|
1965
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1966
|
-
name: errorCode,
|
|
1967
|
-
$metadata: deserializeMetadata(output),
|
|
1968
|
-
};
|
|
1969
|
-
break;
|
|
1970
|
-
case "ServiceQuotaExceededException":
|
|
1971
|
-
case "com.amazonaws.voiceid#ServiceQuotaExceededException":
|
|
1972
|
-
response = {
|
|
1973
|
-
...(await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
1974
|
-
name: errorCode,
|
|
1975
|
-
$metadata: deserializeMetadata(output),
|
|
1976
|
-
};
|
|
1977
|
-
break;
|
|
1978
|
-
case "ThrottlingException":
|
|
1979
|
-
case "com.amazonaws.voiceid#ThrottlingException":
|
|
1980
|
-
response = {
|
|
1981
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1982
|
-
name: errorCode,
|
|
1983
|
-
$metadata: deserializeMetadata(output),
|
|
1984
|
-
};
|
|
1985
|
-
break;
|
|
1986
|
-
case "ValidationException":
|
|
1987
|
-
case "com.amazonaws.voiceid#ValidationException":
|
|
1988
|
-
response = {
|
|
1989
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
1990
|
-
name: errorCode,
|
|
1991
|
-
$metadata: deserializeMetadata(output),
|
|
1992
|
-
};
|
|
1993
|
-
break;
|
|
1994
|
-
default:
|
|
1995
|
-
const parsedBody = parsedOutput.body;
|
|
1996
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1997
|
-
response = {
|
|
1998
|
-
...parsedBody,
|
|
1999
|
-
name: `${errorCode}`,
|
|
2000
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2001
|
-
$fault: "client",
|
|
2002
|
-
$metadata: deserializeMetadata(output),
|
|
2003
|
-
} as any;
|
|
2004
|
-
}
|
|
2005
|
-
const message = response.message || response.Message || errorCode;
|
|
2006
|
-
response.message = message;
|
|
2007
|
-
delete response.Message;
|
|
2008
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2009
|
-
};
|
|
2010
|
-
|
|
2011
|
-
export const deserializeAws_json1_0TagResourceCommand = async (
|
|
2012
|
-
output: __HttpResponse,
|
|
2013
|
-
context: __SerdeContext
|
|
2014
|
-
): Promise<TagResourceCommandOutput> => {
|
|
2015
|
-
if (output.statusCode >= 300) {
|
|
2016
|
-
return deserializeAws_json1_0TagResourceCommandError(output, context);
|
|
2017
|
-
}
|
|
2018
|
-
const data: any = await parseBody(output.body, context);
|
|
2019
|
-
let contents: any = {};
|
|
2020
|
-
contents = deserializeAws_json1_0TagResourceResponse(data, context);
|
|
2021
|
-
const response: TagResourceCommandOutput = {
|
|
2022
|
-
$metadata: deserializeMetadata(output),
|
|
2023
|
-
...contents,
|
|
2024
|
-
};
|
|
2025
|
-
return Promise.resolve(response);
|
|
2026
|
-
};
|
|
2027
|
-
|
|
2028
|
-
const deserializeAws_json1_0TagResourceCommandError = async (
|
|
2029
|
-
output: __HttpResponse,
|
|
2030
|
-
context: __SerdeContext
|
|
2031
|
-
): Promise<TagResourceCommandOutput> => {
|
|
2032
|
-
const parsedOutput: any = {
|
|
2033
|
-
...output,
|
|
2034
|
-
body: await parseBody(output.body, context),
|
|
2035
|
-
};
|
|
2036
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2037
|
-
let errorCode = "UnknownError";
|
|
2038
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2039
|
-
switch (errorCode) {
|
|
2040
|
-
case "AccessDeniedException":
|
|
2041
|
-
case "com.amazonaws.voiceid#AccessDeniedException":
|
|
2042
|
-
response = {
|
|
2043
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2044
|
-
name: errorCode,
|
|
2045
|
-
$metadata: deserializeMetadata(output),
|
|
2046
|
-
};
|
|
2047
|
-
break;
|
|
2048
|
-
case "ConflictException":
|
|
2049
|
-
case "com.amazonaws.voiceid#ConflictException":
|
|
2050
|
-
response = {
|
|
2051
|
-
...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)),
|
|
2052
|
-
name: errorCode,
|
|
2053
|
-
$metadata: deserializeMetadata(output),
|
|
2054
|
-
};
|
|
2055
|
-
break;
|
|
2056
|
-
case "InternalServerException":
|
|
2057
|
-
case "com.amazonaws.voiceid#InternalServerException":
|
|
2058
|
-
response = {
|
|
2059
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
2060
|
-
name: errorCode,
|
|
2061
|
-
$metadata: deserializeMetadata(output),
|
|
2062
|
-
};
|
|
2063
|
-
break;
|
|
2064
|
-
case "ResourceNotFoundException":
|
|
2065
|
-
case "com.amazonaws.voiceid#ResourceNotFoundException":
|
|
2066
|
-
response = {
|
|
2067
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2068
|
-
name: errorCode,
|
|
2069
|
-
$metadata: deserializeMetadata(output),
|
|
2070
|
-
};
|
|
2071
|
-
break;
|
|
2072
|
-
case "ThrottlingException":
|
|
2073
|
-
case "com.amazonaws.voiceid#ThrottlingException":
|
|
2074
|
-
response = {
|
|
2075
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2076
|
-
name: errorCode,
|
|
2077
|
-
$metadata: deserializeMetadata(output),
|
|
2078
|
-
};
|
|
2079
|
-
break;
|
|
2080
|
-
case "ValidationException":
|
|
2081
|
-
case "com.amazonaws.voiceid#ValidationException":
|
|
2082
|
-
response = {
|
|
2083
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
2084
|
-
name: errorCode,
|
|
2085
|
-
$metadata: deserializeMetadata(output),
|
|
2086
|
-
};
|
|
2087
|
-
break;
|
|
2088
|
-
default:
|
|
2089
|
-
const parsedBody = parsedOutput.body;
|
|
2090
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2091
|
-
response = {
|
|
2092
|
-
...parsedBody,
|
|
2093
|
-
name: `${errorCode}`,
|
|
2094
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2095
|
-
$fault: "client",
|
|
2096
|
-
$metadata: deserializeMetadata(output),
|
|
2097
|
-
} as any;
|
|
2098
|
-
}
|
|
2099
|
-
const message = response.message || response.Message || errorCode;
|
|
2100
|
-
response.message = message;
|
|
2101
|
-
delete response.Message;
|
|
2102
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2103
|
-
};
|
|
2104
|
-
|
|
2105
|
-
export const deserializeAws_json1_0UntagResourceCommand = async (
|
|
2106
|
-
output: __HttpResponse,
|
|
2107
|
-
context: __SerdeContext
|
|
2108
|
-
): Promise<UntagResourceCommandOutput> => {
|
|
2109
|
-
if (output.statusCode >= 300) {
|
|
2110
|
-
return deserializeAws_json1_0UntagResourceCommandError(output, context);
|
|
2111
|
-
}
|
|
2112
|
-
const data: any = await parseBody(output.body, context);
|
|
2113
|
-
let contents: any = {};
|
|
2114
|
-
contents = deserializeAws_json1_0UntagResourceResponse(data, context);
|
|
2115
|
-
const response: UntagResourceCommandOutput = {
|
|
2116
|
-
$metadata: deserializeMetadata(output),
|
|
2117
|
-
...contents,
|
|
2118
|
-
};
|
|
2119
|
-
return Promise.resolve(response);
|
|
2120
|
-
};
|
|
2121
|
-
|
|
2122
|
-
const deserializeAws_json1_0UntagResourceCommandError = async (
|
|
2123
|
-
output: __HttpResponse,
|
|
2124
|
-
context: __SerdeContext
|
|
2125
|
-
): Promise<UntagResourceCommandOutput> => {
|
|
2126
|
-
const parsedOutput: any = {
|
|
2127
|
-
...output,
|
|
2128
|
-
body: await parseBody(output.body, context),
|
|
2129
|
-
};
|
|
2130
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2131
|
-
let errorCode = "UnknownError";
|
|
2132
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2133
|
-
switch (errorCode) {
|
|
2134
|
-
case "AccessDeniedException":
|
|
2135
|
-
case "com.amazonaws.voiceid#AccessDeniedException":
|
|
2136
|
-
response = {
|
|
2137
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2138
|
-
name: errorCode,
|
|
2139
|
-
$metadata: deserializeMetadata(output),
|
|
2140
|
-
};
|
|
2141
|
-
break;
|
|
2142
|
-
case "ConflictException":
|
|
2143
|
-
case "com.amazonaws.voiceid#ConflictException":
|
|
2144
|
-
response = {
|
|
2145
|
-
...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)),
|
|
2146
|
-
name: errorCode,
|
|
2147
|
-
$metadata: deserializeMetadata(output),
|
|
2148
|
-
};
|
|
2149
|
-
break;
|
|
2150
|
-
case "InternalServerException":
|
|
2151
|
-
case "com.amazonaws.voiceid#InternalServerException":
|
|
2152
|
-
response = {
|
|
2153
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
2154
|
-
name: errorCode,
|
|
2155
|
-
$metadata: deserializeMetadata(output),
|
|
2156
|
-
};
|
|
2157
|
-
break;
|
|
2158
|
-
case "ResourceNotFoundException":
|
|
2159
|
-
case "com.amazonaws.voiceid#ResourceNotFoundException":
|
|
2160
|
-
response = {
|
|
2161
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2162
|
-
name: errorCode,
|
|
2163
|
-
$metadata: deserializeMetadata(output),
|
|
2164
|
-
};
|
|
2165
|
-
break;
|
|
2166
|
-
case "ThrottlingException":
|
|
2167
|
-
case "com.amazonaws.voiceid#ThrottlingException":
|
|
2168
|
-
response = {
|
|
2169
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2170
|
-
name: errorCode,
|
|
2171
|
-
$metadata: deserializeMetadata(output),
|
|
2172
|
-
};
|
|
2173
|
-
break;
|
|
2174
|
-
case "ValidationException":
|
|
2175
|
-
case "com.amazonaws.voiceid#ValidationException":
|
|
2176
|
-
response = {
|
|
2177
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
2178
|
-
name: errorCode,
|
|
2179
|
-
$metadata: deserializeMetadata(output),
|
|
2180
|
-
};
|
|
2181
|
-
break;
|
|
2182
|
-
default:
|
|
2183
|
-
const parsedBody = parsedOutput.body;
|
|
2184
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2185
|
-
response = {
|
|
2186
|
-
...parsedBody,
|
|
2187
|
-
name: `${errorCode}`,
|
|
2188
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2189
|
-
$fault: "client",
|
|
2190
|
-
$metadata: deserializeMetadata(output),
|
|
2191
|
-
} as any;
|
|
2192
|
-
}
|
|
2193
|
-
const message = response.message || response.Message || errorCode;
|
|
2194
|
-
response.message = message;
|
|
2195
|
-
delete response.Message;
|
|
2196
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2197
|
-
};
|
|
2198
|
-
|
|
2199
|
-
export const deserializeAws_json1_0UpdateDomainCommand = async (
|
|
2200
|
-
output: __HttpResponse,
|
|
2201
|
-
context: __SerdeContext
|
|
2202
|
-
): Promise<UpdateDomainCommandOutput> => {
|
|
2203
|
-
if (output.statusCode >= 300) {
|
|
2204
|
-
return deserializeAws_json1_0UpdateDomainCommandError(output, context);
|
|
2205
|
-
}
|
|
2206
|
-
const data: any = await parseBody(output.body, context);
|
|
2207
|
-
let contents: any = {};
|
|
2208
|
-
contents = deserializeAws_json1_0UpdateDomainResponse(data, context);
|
|
2209
|
-
const response: UpdateDomainCommandOutput = {
|
|
2210
|
-
$metadata: deserializeMetadata(output),
|
|
2211
|
-
...contents,
|
|
2212
|
-
};
|
|
2213
|
-
return Promise.resolve(response);
|
|
2214
|
-
};
|
|
2215
|
-
|
|
2216
|
-
const deserializeAws_json1_0UpdateDomainCommandError = async (
|
|
2217
|
-
output: __HttpResponse,
|
|
2218
|
-
context: __SerdeContext
|
|
2219
|
-
): Promise<UpdateDomainCommandOutput> => {
|
|
2220
|
-
const parsedOutput: any = {
|
|
2221
|
-
...output,
|
|
2222
|
-
body: await parseBody(output.body, context),
|
|
2223
|
-
};
|
|
2224
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2225
|
-
let errorCode = "UnknownError";
|
|
2226
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2227
|
-
switch (errorCode) {
|
|
2228
|
-
case "AccessDeniedException":
|
|
2229
|
-
case "com.amazonaws.voiceid#AccessDeniedException":
|
|
2230
|
-
response = {
|
|
2231
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2232
|
-
name: errorCode,
|
|
2233
|
-
$metadata: deserializeMetadata(output),
|
|
2234
|
-
};
|
|
2235
|
-
break;
|
|
2236
|
-
case "ConflictException":
|
|
2237
|
-
case "com.amazonaws.voiceid#ConflictException":
|
|
2238
|
-
response = {
|
|
2239
|
-
...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)),
|
|
2240
|
-
name: errorCode,
|
|
2241
|
-
$metadata: deserializeMetadata(output),
|
|
2242
|
-
};
|
|
2243
|
-
break;
|
|
2244
|
-
case "InternalServerException":
|
|
2245
|
-
case "com.amazonaws.voiceid#InternalServerException":
|
|
2246
|
-
response = {
|
|
2247
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
2248
|
-
name: errorCode,
|
|
2249
|
-
$metadata: deserializeMetadata(output),
|
|
2250
|
-
};
|
|
2251
|
-
break;
|
|
2252
|
-
case "ResourceNotFoundException":
|
|
2253
|
-
case "com.amazonaws.voiceid#ResourceNotFoundException":
|
|
2254
|
-
response = {
|
|
2255
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2256
|
-
name: errorCode,
|
|
2257
|
-
$metadata: deserializeMetadata(output),
|
|
2258
|
-
};
|
|
2259
|
-
break;
|
|
2260
|
-
case "ThrottlingException":
|
|
2261
|
-
case "com.amazonaws.voiceid#ThrottlingException":
|
|
2262
|
-
response = {
|
|
2263
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2264
|
-
name: errorCode,
|
|
2265
|
-
$metadata: deserializeMetadata(output),
|
|
2266
|
-
};
|
|
2267
|
-
break;
|
|
2268
|
-
case "ValidationException":
|
|
2269
|
-
case "com.amazonaws.voiceid#ValidationException":
|
|
2270
|
-
response = {
|
|
2271
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
2272
|
-
name: errorCode,
|
|
2273
|
-
$metadata: deserializeMetadata(output),
|
|
2274
|
-
};
|
|
2275
|
-
break;
|
|
2276
|
-
default:
|
|
2277
|
-
const parsedBody = parsedOutput.body;
|
|
2278
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2279
|
-
response = {
|
|
2280
|
-
...parsedBody,
|
|
2281
|
-
name: `${errorCode}`,
|
|
2282
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2283
|
-
$fault: "client",
|
|
2284
|
-
$metadata: deserializeMetadata(output),
|
|
2285
|
-
} as any;
|
|
2286
|
-
}
|
|
2287
|
-
const message = response.message || response.Message || errorCode;
|
|
2288
|
-
response.message = message;
|
|
2289
|
-
delete response.Message;
|
|
2290
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2291
|
-
};
|
|
2292
|
-
|
|
2293
|
-
const deserializeAws_json1_0AccessDeniedExceptionResponse = async (
|
|
2294
|
-
parsedOutput: any,
|
|
2295
|
-
context: __SerdeContext
|
|
2296
|
-
): Promise<AccessDeniedException> => {
|
|
2297
|
-
const body = parsedOutput.body;
|
|
2298
|
-
const deserialized: any = deserializeAws_json1_0AccessDeniedException(body, context);
|
|
2299
|
-
const contents: AccessDeniedException = {
|
|
2300
|
-
name: "AccessDeniedException",
|
|
2301
|
-
$fault: "client",
|
|
2302
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2303
|
-
...deserialized,
|
|
2304
|
-
};
|
|
2305
|
-
return contents;
|
|
2306
|
-
};
|
|
2307
|
-
|
|
2308
|
-
const deserializeAws_json1_0ConflictExceptionResponse = async (
|
|
2309
|
-
parsedOutput: any,
|
|
2310
|
-
context: __SerdeContext
|
|
2311
|
-
): Promise<ConflictException> => {
|
|
2312
|
-
const body = parsedOutput.body;
|
|
2313
|
-
const deserialized: any = deserializeAws_json1_0ConflictException(body, context);
|
|
2314
|
-
const contents: ConflictException = {
|
|
2315
|
-
name: "ConflictException",
|
|
2316
|
-
$fault: "client",
|
|
2317
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2318
|
-
...deserialized,
|
|
2319
|
-
};
|
|
2320
|
-
return contents;
|
|
2321
|
-
};
|
|
2322
|
-
|
|
2323
|
-
const deserializeAws_json1_0InternalServerExceptionResponse = async (
|
|
2324
|
-
parsedOutput: any,
|
|
2325
|
-
context: __SerdeContext
|
|
2326
|
-
): Promise<InternalServerException> => {
|
|
2327
|
-
const body = parsedOutput.body;
|
|
2328
|
-
const deserialized: any = deserializeAws_json1_0InternalServerException(body, context);
|
|
2329
|
-
const contents: InternalServerException = {
|
|
2330
|
-
name: "InternalServerException",
|
|
2331
|
-
$fault: "server",
|
|
2332
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2333
|
-
...deserialized,
|
|
2334
|
-
};
|
|
2335
|
-
return contents;
|
|
2336
|
-
};
|
|
2337
|
-
|
|
2338
|
-
const deserializeAws_json1_0ResourceNotFoundExceptionResponse = async (
|
|
2339
|
-
parsedOutput: any,
|
|
2340
|
-
context: __SerdeContext
|
|
2341
|
-
): Promise<ResourceNotFoundException> => {
|
|
2342
|
-
const body = parsedOutput.body;
|
|
2343
|
-
const deserialized: any = deserializeAws_json1_0ResourceNotFoundException(body, context);
|
|
2344
|
-
const contents: ResourceNotFoundException = {
|
|
2345
|
-
name: "ResourceNotFoundException",
|
|
2346
|
-
$fault: "client",
|
|
2347
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2348
|
-
...deserialized,
|
|
2349
|
-
};
|
|
2350
|
-
return contents;
|
|
2351
|
-
};
|
|
2352
|
-
|
|
2353
|
-
const deserializeAws_json1_0ServiceQuotaExceededExceptionResponse = async (
|
|
2354
|
-
parsedOutput: any,
|
|
2355
|
-
context: __SerdeContext
|
|
2356
|
-
): Promise<ServiceQuotaExceededException> => {
|
|
2357
|
-
const body = parsedOutput.body;
|
|
2358
|
-
const deserialized: any = deserializeAws_json1_0ServiceQuotaExceededException(body, context);
|
|
2359
|
-
const contents: ServiceQuotaExceededException = {
|
|
2360
|
-
name: "ServiceQuotaExceededException",
|
|
2361
|
-
$fault: "client",
|
|
2362
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2363
|
-
...deserialized,
|
|
2364
|
-
};
|
|
2365
|
-
return contents;
|
|
2366
|
-
};
|
|
2367
|
-
|
|
2368
|
-
const deserializeAws_json1_0ThrottlingExceptionResponse = async (
|
|
2369
|
-
parsedOutput: any,
|
|
2370
|
-
context: __SerdeContext
|
|
2371
|
-
): Promise<ThrottlingException> => {
|
|
2372
|
-
const body = parsedOutput.body;
|
|
2373
|
-
const deserialized: any = deserializeAws_json1_0ThrottlingException(body, context);
|
|
2374
|
-
const contents: ThrottlingException = {
|
|
2375
|
-
name: "ThrottlingException",
|
|
2376
|
-
$fault: "client",
|
|
2377
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2378
|
-
...deserialized,
|
|
2379
|
-
};
|
|
2380
|
-
return contents;
|
|
2381
|
-
};
|
|
2382
|
-
|
|
2383
|
-
const deserializeAws_json1_0ValidationExceptionResponse = async (
|
|
2384
|
-
parsedOutput: any,
|
|
2385
|
-
context: __SerdeContext
|
|
2386
|
-
): Promise<ValidationException> => {
|
|
2387
|
-
const body = parsedOutput.body;
|
|
2388
|
-
const deserialized: any = deserializeAws_json1_0ValidationException(body, context);
|
|
2389
|
-
const contents: ValidationException = {
|
|
2390
|
-
name: "ValidationException",
|
|
2391
|
-
$fault: "client",
|
|
2392
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2393
|
-
...deserialized,
|
|
2394
|
-
};
|
|
2395
|
-
return contents;
|
|
2396
|
-
};
|
|
2397
|
-
|
|
2398
|
-
const serializeAws_json1_0CreateDomainRequest = (input: CreateDomainRequest, context: __SerdeContext): any => {
|
|
2399
|
-
return {
|
|
2400
|
-
ClientToken: input.ClientToken ?? generateIdempotencyToken(),
|
|
2401
|
-
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
2402
|
-
...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
|
|
2403
|
-
...(input.ServerSideEncryptionConfiguration !== undefined &&
|
|
2404
|
-
input.ServerSideEncryptionConfiguration !== null && {
|
|
2405
|
-
ServerSideEncryptionConfiguration: serializeAws_json1_0ServerSideEncryptionConfiguration(
|
|
2406
|
-
input.ServerSideEncryptionConfiguration,
|
|
2407
|
-
context
|
|
2408
|
-
),
|
|
2409
|
-
}),
|
|
2410
|
-
...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_0TagList(input.Tags, context) }),
|
|
2411
|
-
};
|
|
2412
|
-
};
|
|
2413
|
-
|
|
2414
|
-
const serializeAws_json1_0DeleteDomainRequest = (input: DeleteDomainRequest, context: __SerdeContext): any => {
|
|
2415
|
-
return {
|
|
2416
|
-
...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }),
|
|
2417
|
-
};
|
|
2418
|
-
};
|
|
2419
|
-
|
|
2420
|
-
const serializeAws_json1_0DeleteFraudsterRequest = (input: DeleteFraudsterRequest, context: __SerdeContext): any => {
|
|
2421
|
-
return {
|
|
2422
|
-
...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }),
|
|
2423
|
-
...(input.FraudsterId !== undefined && input.FraudsterId !== null && { FraudsterId: input.FraudsterId }),
|
|
2424
|
-
};
|
|
2425
|
-
};
|
|
2426
|
-
|
|
2427
|
-
const serializeAws_json1_0DeleteSpeakerRequest = (input: DeleteSpeakerRequest, context: __SerdeContext): any => {
|
|
2428
|
-
return {
|
|
2429
|
-
...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }),
|
|
2430
|
-
...(input.SpeakerId !== undefined && input.SpeakerId !== null && { SpeakerId: input.SpeakerId }),
|
|
2431
|
-
};
|
|
2432
|
-
};
|
|
2433
|
-
|
|
2434
|
-
const serializeAws_json1_0DescribeDomainRequest = (input: DescribeDomainRequest, context: __SerdeContext): any => {
|
|
2435
|
-
return {
|
|
2436
|
-
...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }),
|
|
2437
|
-
};
|
|
2438
|
-
};
|
|
2439
|
-
|
|
2440
|
-
const serializeAws_json1_0DescribeFraudsterRegistrationJobRequest = (
|
|
2441
|
-
input: DescribeFraudsterRegistrationJobRequest,
|
|
2442
|
-
context: __SerdeContext
|
|
2443
|
-
): any => {
|
|
2444
|
-
return {
|
|
2445
|
-
...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }),
|
|
2446
|
-
...(input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }),
|
|
2447
|
-
};
|
|
2448
|
-
};
|
|
2449
|
-
|
|
2450
|
-
const serializeAws_json1_0DescribeFraudsterRequest = (
|
|
2451
|
-
input: DescribeFraudsterRequest,
|
|
2452
|
-
context: __SerdeContext
|
|
2453
|
-
): any => {
|
|
2454
|
-
return {
|
|
2455
|
-
...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }),
|
|
2456
|
-
...(input.FraudsterId !== undefined && input.FraudsterId !== null && { FraudsterId: input.FraudsterId }),
|
|
2457
|
-
};
|
|
2458
|
-
};
|
|
2459
|
-
|
|
2460
|
-
const serializeAws_json1_0DescribeSpeakerEnrollmentJobRequest = (
|
|
2461
|
-
input: DescribeSpeakerEnrollmentJobRequest,
|
|
2462
|
-
context: __SerdeContext
|
|
2463
|
-
): any => {
|
|
2464
|
-
return {
|
|
2465
|
-
...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }),
|
|
2466
|
-
...(input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }),
|
|
2467
|
-
};
|
|
2468
|
-
};
|
|
2469
|
-
|
|
2470
|
-
const serializeAws_json1_0DescribeSpeakerRequest = (input: DescribeSpeakerRequest, context: __SerdeContext): any => {
|
|
2471
|
-
return {
|
|
2472
|
-
...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }),
|
|
2473
|
-
...(input.SpeakerId !== undefined && input.SpeakerId !== null && { SpeakerId: input.SpeakerId }),
|
|
2474
|
-
};
|
|
2475
|
-
};
|
|
2476
|
-
|
|
2477
|
-
const serializeAws_json1_0EnrollmentConfig = (input: EnrollmentConfig, context: __SerdeContext): any => {
|
|
2478
|
-
return {
|
|
2479
|
-
...(input.ExistingEnrollmentAction !== undefined &&
|
|
2480
|
-
input.ExistingEnrollmentAction !== null && { ExistingEnrollmentAction: input.ExistingEnrollmentAction }),
|
|
2481
|
-
...(input.FraudDetectionConfig !== undefined &&
|
|
2482
|
-
input.FraudDetectionConfig !== null && {
|
|
2483
|
-
FraudDetectionConfig: serializeAws_json1_0EnrollmentJobFraudDetectionConfig(
|
|
2484
|
-
input.FraudDetectionConfig,
|
|
2485
|
-
context
|
|
2486
|
-
),
|
|
2487
|
-
}),
|
|
2488
|
-
};
|
|
2489
|
-
};
|
|
2490
|
-
|
|
2491
|
-
const serializeAws_json1_0EnrollmentJobFraudDetectionConfig = (
|
|
2492
|
-
input: EnrollmentJobFraudDetectionConfig,
|
|
2493
|
-
context: __SerdeContext
|
|
2494
|
-
): any => {
|
|
2495
|
-
return {
|
|
2496
|
-
...(input.FraudDetectionAction !== undefined &&
|
|
2497
|
-
input.FraudDetectionAction !== null && { FraudDetectionAction: input.FraudDetectionAction }),
|
|
2498
|
-
...(input.RiskThreshold !== undefined && input.RiskThreshold !== null && { RiskThreshold: input.RiskThreshold }),
|
|
2499
|
-
};
|
|
2500
|
-
};
|
|
2501
|
-
|
|
2502
|
-
const serializeAws_json1_0EvaluateSessionRequest = (input: EvaluateSessionRequest, context: __SerdeContext): any => {
|
|
2503
|
-
return {
|
|
2504
|
-
...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }),
|
|
2505
|
-
...(input.SessionNameOrId !== undefined &&
|
|
2506
|
-
input.SessionNameOrId !== null && { SessionNameOrId: input.SessionNameOrId }),
|
|
2507
|
-
};
|
|
2508
|
-
};
|
|
2509
|
-
|
|
2510
|
-
const serializeAws_json1_0InputDataConfig = (input: InputDataConfig, context: __SerdeContext): any => {
|
|
2511
|
-
return {
|
|
2512
|
-
...(input.S3Uri !== undefined && input.S3Uri !== null && { S3Uri: input.S3Uri }),
|
|
2513
|
-
};
|
|
2514
|
-
};
|
|
2515
|
-
|
|
2516
|
-
const serializeAws_json1_0ListDomainsRequest = (input: ListDomainsRequest, context: __SerdeContext): any => {
|
|
2517
|
-
return {
|
|
2518
|
-
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
2519
|
-
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
2520
|
-
};
|
|
2521
|
-
};
|
|
2522
|
-
|
|
2523
|
-
const serializeAws_json1_0ListFraudsterRegistrationJobsRequest = (
|
|
2524
|
-
input: ListFraudsterRegistrationJobsRequest,
|
|
2525
|
-
context: __SerdeContext
|
|
2526
|
-
): any => {
|
|
2527
|
-
return {
|
|
2528
|
-
...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }),
|
|
2529
|
-
...(input.JobStatus !== undefined && input.JobStatus !== null && { JobStatus: input.JobStatus }),
|
|
2530
|
-
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
2531
|
-
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
2532
|
-
};
|
|
2533
|
-
};
|
|
2534
|
-
|
|
2535
|
-
const serializeAws_json1_0ListSpeakerEnrollmentJobsRequest = (
|
|
2536
|
-
input: ListSpeakerEnrollmentJobsRequest,
|
|
2537
|
-
context: __SerdeContext
|
|
2538
|
-
): any => {
|
|
2539
|
-
return {
|
|
2540
|
-
...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }),
|
|
2541
|
-
...(input.JobStatus !== undefined && input.JobStatus !== null && { JobStatus: input.JobStatus }),
|
|
2542
|
-
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
2543
|
-
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
2544
|
-
};
|
|
2545
|
-
};
|
|
2546
|
-
|
|
2547
|
-
const serializeAws_json1_0ListSpeakersRequest = (input: ListSpeakersRequest, context: __SerdeContext): any => {
|
|
2548
|
-
return {
|
|
2549
|
-
...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }),
|
|
2550
|
-
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
2551
|
-
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
2552
|
-
};
|
|
2553
|
-
};
|
|
2554
|
-
|
|
2555
|
-
const serializeAws_json1_0ListTagsForResourceRequest = (
|
|
2556
|
-
input: ListTagsForResourceRequest,
|
|
2557
|
-
context: __SerdeContext
|
|
2558
|
-
): any => {
|
|
2559
|
-
return {
|
|
2560
|
-
...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
|
|
2561
|
-
};
|
|
2562
|
-
};
|
|
2563
|
-
|
|
2564
|
-
const serializeAws_json1_0OptOutSpeakerRequest = (input: OptOutSpeakerRequest, context: __SerdeContext): any => {
|
|
2565
|
-
return {
|
|
2566
|
-
...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }),
|
|
2567
|
-
...(input.SpeakerId !== undefined && input.SpeakerId !== null && { SpeakerId: input.SpeakerId }),
|
|
2568
|
-
};
|
|
2569
|
-
};
|
|
2570
|
-
|
|
2571
|
-
const serializeAws_json1_0OutputDataConfig = (input: OutputDataConfig, context: __SerdeContext): any => {
|
|
2572
|
-
return {
|
|
2573
|
-
...(input.KmsKeyId !== undefined && input.KmsKeyId !== null && { KmsKeyId: input.KmsKeyId }),
|
|
2574
|
-
...(input.S3Uri !== undefined && input.S3Uri !== null && { S3Uri: input.S3Uri }),
|
|
2575
|
-
};
|
|
2576
|
-
};
|
|
2577
|
-
|
|
2578
|
-
const serializeAws_json1_0RegistrationConfig = (input: RegistrationConfig, context: __SerdeContext): any => {
|
|
2579
|
-
return {
|
|
2580
|
-
...(input.DuplicateRegistrationAction !== undefined &&
|
|
2581
|
-
input.DuplicateRegistrationAction !== null && { DuplicateRegistrationAction: input.DuplicateRegistrationAction }),
|
|
2582
|
-
...(input.FraudsterSimilarityThreshold !== undefined &&
|
|
2583
|
-
input.FraudsterSimilarityThreshold !== null && {
|
|
2584
|
-
FraudsterSimilarityThreshold: input.FraudsterSimilarityThreshold,
|
|
2585
|
-
}),
|
|
2586
|
-
};
|
|
2587
|
-
};
|
|
2588
|
-
|
|
2589
|
-
const serializeAws_json1_0ServerSideEncryptionConfiguration = (
|
|
2590
|
-
input: ServerSideEncryptionConfiguration,
|
|
2591
|
-
context: __SerdeContext
|
|
2592
|
-
): any => {
|
|
2593
|
-
return {
|
|
2594
|
-
...(input.KmsKeyId !== undefined && input.KmsKeyId !== null && { KmsKeyId: input.KmsKeyId }),
|
|
2595
|
-
};
|
|
2596
|
-
};
|
|
2597
|
-
|
|
2598
|
-
const serializeAws_json1_0StartFraudsterRegistrationJobRequest = (
|
|
2599
|
-
input: StartFraudsterRegistrationJobRequest,
|
|
2600
|
-
context: __SerdeContext
|
|
2601
|
-
): any => {
|
|
2602
|
-
return {
|
|
2603
|
-
ClientToken: input.ClientToken ?? generateIdempotencyToken(),
|
|
2604
|
-
...(input.DataAccessRoleArn !== undefined &&
|
|
2605
|
-
input.DataAccessRoleArn !== null && { DataAccessRoleArn: input.DataAccessRoleArn }),
|
|
2606
|
-
...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }),
|
|
2607
|
-
...(input.InputDataConfig !== undefined &&
|
|
2608
|
-
input.InputDataConfig !== null && {
|
|
2609
|
-
InputDataConfig: serializeAws_json1_0InputDataConfig(input.InputDataConfig, context),
|
|
2610
|
-
}),
|
|
2611
|
-
...(input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName }),
|
|
2612
|
-
...(input.OutputDataConfig !== undefined &&
|
|
2613
|
-
input.OutputDataConfig !== null && {
|
|
2614
|
-
OutputDataConfig: serializeAws_json1_0OutputDataConfig(input.OutputDataConfig, context),
|
|
2615
|
-
}),
|
|
2616
|
-
...(input.RegistrationConfig !== undefined &&
|
|
2617
|
-
input.RegistrationConfig !== null && {
|
|
2618
|
-
RegistrationConfig: serializeAws_json1_0RegistrationConfig(input.RegistrationConfig, context),
|
|
2619
|
-
}),
|
|
2620
|
-
};
|
|
2621
|
-
};
|
|
2622
|
-
|
|
2623
|
-
const serializeAws_json1_0StartSpeakerEnrollmentJobRequest = (
|
|
2624
|
-
input: StartSpeakerEnrollmentJobRequest,
|
|
2625
|
-
context: __SerdeContext
|
|
2626
|
-
): any => {
|
|
2627
|
-
return {
|
|
2628
|
-
ClientToken: input.ClientToken ?? generateIdempotencyToken(),
|
|
2629
|
-
...(input.DataAccessRoleArn !== undefined &&
|
|
2630
|
-
input.DataAccessRoleArn !== null && { DataAccessRoleArn: input.DataAccessRoleArn }),
|
|
2631
|
-
...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }),
|
|
2632
|
-
...(input.EnrollmentConfig !== undefined &&
|
|
2633
|
-
input.EnrollmentConfig !== null && {
|
|
2634
|
-
EnrollmentConfig: serializeAws_json1_0EnrollmentConfig(input.EnrollmentConfig, context),
|
|
2635
|
-
}),
|
|
2636
|
-
...(input.InputDataConfig !== undefined &&
|
|
2637
|
-
input.InputDataConfig !== null && {
|
|
2638
|
-
InputDataConfig: serializeAws_json1_0InputDataConfig(input.InputDataConfig, context),
|
|
2639
|
-
}),
|
|
2640
|
-
...(input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName }),
|
|
2641
|
-
...(input.OutputDataConfig !== undefined &&
|
|
2642
|
-
input.OutputDataConfig !== null && {
|
|
2643
|
-
OutputDataConfig: serializeAws_json1_0OutputDataConfig(input.OutputDataConfig, context),
|
|
2644
|
-
}),
|
|
2645
|
-
};
|
|
2646
|
-
};
|
|
2647
|
-
|
|
2648
|
-
const serializeAws_json1_0Tag = (input: Tag, context: __SerdeContext): any => {
|
|
2649
|
-
return {
|
|
2650
|
-
...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
|
|
2651
|
-
...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
|
|
2652
|
-
};
|
|
2653
|
-
};
|
|
2654
|
-
|
|
2655
|
-
const serializeAws_json1_0TagKeyList = (input: string[], context: __SerdeContext): any => {
|
|
2656
|
-
return input
|
|
2657
|
-
.filter((e: any) => e != null)
|
|
2658
|
-
.map((entry) => {
|
|
2659
|
-
if (entry === null) {
|
|
2660
|
-
return null as any;
|
|
2661
|
-
}
|
|
2662
|
-
return entry;
|
|
2663
|
-
});
|
|
2664
|
-
};
|
|
2665
|
-
|
|
2666
|
-
const serializeAws_json1_0TagList = (input: Tag[], context: __SerdeContext): any => {
|
|
2667
|
-
return input
|
|
2668
|
-
.filter((e: any) => e != null)
|
|
2669
|
-
.map((entry) => {
|
|
2670
|
-
if (entry === null) {
|
|
2671
|
-
return null as any;
|
|
2672
|
-
}
|
|
2673
|
-
return serializeAws_json1_0Tag(entry, context);
|
|
2674
|
-
});
|
|
2675
|
-
};
|
|
2676
|
-
|
|
2677
|
-
const serializeAws_json1_0TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => {
|
|
2678
|
-
return {
|
|
2679
|
-
...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
|
|
2680
|
-
...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_0TagList(input.Tags, context) }),
|
|
2681
|
-
};
|
|
2682
|
-
};
|
|
2683
|
-
|
|
2684
|
-
const serializeAws_json1_0UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => {
|
|
2685
|
-
return {
|
|
2686
|
-
...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
|
|
2687
|
-
...(input.TagKeys !== undefined &&
|
|
2688
|
-
input.TagKeys !== null && { TagKeys: serializeAws_json1_0TagKeyList(input.TagKeys, context) }),
|
|
2689
|
-
};
|
|
2690
|
-
};
|
|
2691
|
-
|
|
2692
|
-
const serializeAws_json1_0UpdateDomainRequest = (input: UpdateDomainRequest, context: __SerdeContext): any => {
|
|
2693
|
-
return {
|
|
2694
|
-
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
2695
|
-
...(input.DomainId !== undefined && input.DomainId !== null && { DomainId: input.DomainId }),
|
|
2696
|
-
...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
|
|
2697
|
-
...(input.ServerSideEncryptionConfiguration !== undefined &&
|
|
2698
|
-
input.ServerSideEncryptionConfiguration !== null && {
|
|
2699
|
-
ServerSideEncryptionConfiguration: serializeAws_json1_0ServerSideEncryptionConfiguration(
|
|
2700
|
-
input.ServerSideEncryptionConfiguration,
|
|
2701
|
-
context
|
|
2702
|
-
),
|
|
2703
|
-
}),
|
|
2704
|
-
};
|
|
2705
|
-
};
|
|
2706
|
-
|
|
2707
|
-
const deserializeAws_json1_0AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => {
|
|
2708
|
-
return {
|
|
2709
|
-
Message: __expectString(output.Message),
|
|
2710
|
-
} as any;
|
|
2711
|
-
};
|
|
2712
|
-
|
|
2713
|
-
const deserializeAws_json1_0AuthenticationConfiguration = (
|
|
2714
|
-
output: any,
|
|
2715
|
-
context: __SerdeContext
|
|
2716
|
-
): AuthenticationConfiguration => {
|
|
2717
|
-
return {
|
|
2718
|
-
AcceptanceThreshold: __expectInt32(output.AcceptanceThreshold),
|
|
2719
|
-
} as any;
|
|
2720
|
-
};
|
|
2721
|
-
|
|
2722
|
-
const deserializeAws_json1_0AuthenticationResult = (output: any, context: __SerdeContext): AuthenticationResult => {
|
|
2723
|
-
return {
|
|
2724
|
-
AudioAggregationEndedAt:
|
|
2725
|
-
output.AudioAggregationEndedAt !== undefined && output.AudioAggregationEndedAt !== null
|
|
2726
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AudioAggregationEndedAt)))
|
|
2727
|
-
: undefined,
|
|
2728
|
-
AudioAggregationStartedAt:
|
|
2729
|
-
output.AudioAggregationStartedAt !== undefined && output.AudioAggregationStartedAt !== null
|
|
2730
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AudioAggregationStartedAt)))
|
|
2731
|
-
: undefined,
|
|
2732
|
-
AuthenticationResultId: __expectString(output.AuthenticationResultId),
|
|
2733
|
-
Configuration:
|
|
2734
|
-
output.Configuration !== undefined && output.Configuration !== null
|
|
2735
|
-
? deserializeAws_json1_0AuthenticationConfiguration(output.Configuration, context)
|
|
2736
|
-
: undefined,
|
|
2737
|
-
CustomerSpeakerId: __expectString(output.CustomerSpeakerId),
|
|
2738
|
-
Decision: __expectString(output.Decision),
|
|
2739
|
-
GeneratedSpeakerId: __expectString(output.GeneratedSpeakerId),
|
|
2740
|
-
Score: __expectInt32(output.Score),
|
|
2741
|
-
} as any;
|
|
2742
|
-
};
|
|
2743
|
-
|
|
2744
|
-
const deserializeAws_json1_0ConflictException = (output: any, context: __SerdeContext): ConflictException => {
|
|
2745
|
-
return {
|
|
2746
|
-
ConflictType: __expectString(output.ConflictType),
|
|
2747
|
-
Message: __expectString(output.Message),
|
|
2748
|
-
} as any;
|
|
2749
|
-
};
|
|
2750
|
-
|
|
2751
|
-
const deserializeAws_json1_0CreateDomainResponse = (output: any, context: __SerdeContext): CreateDomainResponse => {
|
|
2752
|
-
return {
|
|
2753
|
-
Domain:
|
|
2754
|
-
output.Domain !== undefined && output.Domain !== null
|
|
2755
|
-
? deserializeAws_json1_0Domain(output.Domain, context)
|
|
2756
|
-
: undefined,
|
|
2757
|
-
} as any;
|
|
2758
|
-
};
|
|
2759
|
-
|
|
2760
|
-
const deserializeAws_json1_0DescribeDomainResponse = (output: any, context: __SerdeContext): DescribeDomainResponse => {
|
|
2761
|
-
return {
|
|
2762
|
-
Domain:
|
|
2763
|
-
output.Domain !== undefined && output.Domain !== null
|
|
2764
|
-
? deserializeAws_json1_0Domain(output.Domain, context)
|
|
2765
|
-
: undefined,
|
|
2766
|
-
} as any;
|
|
2767
|
-
};
|
|
2768
|
-
|
|
2769
|
-
const deserializeAws_json1_0DescribeFraudsterRegistrationJobResponse = (
|
|
2770
|
-
output: any,
|
|
2771
|
-
context: __SerdeContext
|
|
2772
|
-
): DescribeFraudsterRegistrationJobResponse => {
|
|
2773
|
-
return {
|
|
2774
|
-
Job:
|
|
2775
|
-
output.Job !== undefined && output.Job !== null
|
|
2776
|
-
? deserializeAws_json1_0FraudsterRegistrationJob(output.Job, context)
|
|
2777
|
-
: undefined,
|
|
2778
|
-
} as any;
|
|
2779
|
-
};
|
|
2780
|
-
|
|
2781
|
-
const deserializeAws_json1_0DescribeFraudsterResponse = (
|
|
2782
|
-
output: any,
|
|
2783
|
-
context: __SerdeContext
|
|
2784
|
-
): DescribeFraudsterResponse => {
|
|
2785
|
-
return {
|
|
2786
|
-
Fraudster:
|
|
2787
|
-
output.Fraudster !== undefined && output.Fraudster !== null
|
|
2788
|
-
? deserializeAws_json1_0Fraudster(output.Fraudster, context)
|
|
2789
|
-
: undefined,
|
|
2790
|
-
} as any;
|
|
2791
|
-
};
|
|
2792
|
-
|
|
2793
|
-
const deserializeAws_json1_0DescribeSpeakerEnrollmentJobResponse = (
|
|
2794
|
-
output: any,
|
|
2795
|
-
context: __SerdeContext
|
|
2796
|
-
): DescribeSpeakerEnrollmentJobResponse => {
|
|
2797
|
-
return {
|
|
2798
|
-
Job:
|
|
2799
|
-
output.Job !== undefined && output.Job !== null
|
|
2800
|
-
? deserializeAws_json1_0SpeakerEnrollmentJob(output.Job, context)
|
|
2801
|
-
: undefined,
|
|
2802
|
-
} as any;
|
|
2803
|
-
};
|
|
2804
|
-
|
|
2805
|
-
const deserializeAws_json1_0DescribeSpeakerResponse = (
|
|
2806
|
-
output: any,
|
|
2807
|
-
context: __SerdeContext
|
|
2808
|
-
): DescribeSpeakerResponse => {
|
|
2809
|
-
return {
|
|
2810
|
-
Speaker:
|
|
2811
|
-
output.Speaker !== undefined && output.Speaker !== null
|
|
2812
|
-
? deserializeAws_json1_0Speaker(output.Speaker, context)
|
|
2813
|
-
: undefined,
|
|
2814
|
-
} as any;
|
|
2815
|
-
};
|
|
2816
|
-
|
|
2817
|
-
const deserializeAws_json1_0Domain = (output: any, context: __SerdeContext): Domain => {
|
|
2818
|
-
return {
|
|
2819
|
-
Arn: __expectString(output.Arn),
|
|
2820
|
-
CreatedAt:
|
|
2821
|
-
output.CreatedAt !== undefined && output.CreatedAt !== null
|
|
2822
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
|
|
2823
|
-
: undefined,
|
|
2824
|
-
Description: __expectString(output.Description),
|
|
2825
|
-
DomainId: __expectString(output.DomainId),
|
|
2826
|
-
DomainStatus: __expectString(output.DomainStatus),
|
|
2827
|
-
Name: __expectString(output.Name),
|
|
2828
|
-
ServerSideEncryptionConfiguration:
|
|
2829
|
-
output.ServerSideEncryptionConfiguration !== undefined && output.ServerSideEncryptionConfiguration !== null
|
|
2830
|
-
? deserializeAws_json1_0ServerSideEncryptionConfiguration(output.ServerSideEncryptionConfiguration, context)
|
|
2831
|
-
: undefined,
|
|
2832
|
-
UpdatedAt:
|
|
2833
|
-
output.UpdatedAt !== undefined && output.UpdatedAt !== null
|
|
2834
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt)))
|
|
2835
|
-
: undefined,
|
|
2836
|
-
} as any;
|
|
2837
|
-
};
|
|
2838
|
-
|
|
2839
|
-
const deserializeAws_json1_0DomainSummaries = (output: any, context: __SerdeContext): DomainSummary[] => {
|
|
2840
|
-
return (output || [])
|
|
2841
|
-
.filter((e: any) => e != null)
|
|
2842
|
-
.map((entry: any) => {
|
|
2843
|
-
if (entry === null) {
|
|
2844
|
-
return null as any;
|
|
2845
|
-
}
|
|
2846
|
-
return deserializeAws_json1_0DomainSummary(entry, context);
|
|
2847
|
-
});
|
|
2848
|
-
};
|
|
2849
|
-
|
|
2850
|
-
const deserializeAws_json1_0DomainSummary = (output: any, context: __SerdeContext): DomainSummary => {
|
|
2851
|
-
return {
|
|
2852
|
-
Arn: __expectString(output.Arn),
|
|
2853
|
-
CreatedAt:
|
|
2854
|
-
output.CreatedAt !== undefined && output.CreatedAt !== null
|
|
2855
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
|
|
2856
|
-
: undefined,
|
|
2857
|
-
Description: __expectString(output.Description),
|
|
2858
|
-
DomainId: __expectString(output.DomainId),
|
|
2859
|
-
DomainStatus: __expectString(output.DomainStatus),
|
|
2860
|
-
Name: __expectString(output.Name),
|
|
2861
|
-
ServerSideEncryptionConfiguration:
|
|
2862
|
-
output.ServerSideEncryptionConfiguration !== undefined && output.ServerSideEncryptionConfiguration !== null
|
|
2863
|
-
? deserializeAws_json1_0ServerSideEncryptionConfiguration(output.ServerSideEncryptionConfiguration, context)
|
|
2864
|
-
: undefined,
|
|
2865
|
-
UpdatedAt:
|
|
2866
|
-
output.UpdatedAt !== undefined && output.UpdatedAt !== null
|
|
2867
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt)))
|
|
2868
|
-
: undefined,
|
|
2869
|
-
} as any;
|
|
2870
|
-
};
|
|
2871
|
-
|
|
2872
|
-
const deserializeAws_json1_0EnrollmentConfig = (output: any, context: __SerdeContext): EnrollmentConfig => {
|
|
2873
|
-
return {
|
|
2874
|
-
ExistingEnrollmentAction: __expectString(output.ExistingEnrollmentAction),
|
|
2875
|
-
FraudDetectionConfig:
|
|
2876
|
-
output.FraudDetectionConfig !== undefined && output.FraudDetectionConfig !== null
|
|
2877
|
-
? deserializeAws_json1_0EnrollmentJobFraudDetectionConfig(output.FraudDetectionConfig, context)
|
|
2878
|
-
: undefined,
|
|
2879
|
-
} as any;
|
|
2880
|
-
};
|
|
2881
|
-
|
|
2882
|
-
const deserializeAws_json1_0EnrollmentJobFraudDetectionConfig = (
|
|
2883
|
-
output: any,
|
|
2884
|
-
context: __SerdeContext
|
|
2885
|
-
): EnrollmentJobFraudDetectionConfig => {
|
|
2886
|
-
return {
|
|
2887
|
-
FraudDetectionAction: __expectString(output.FraudDetectionAction),
|
|
2888
|
-
RiskThreshold: __expectInt32(output.RiskThreshold),
|
|
2889
|
-
} as any;
|
|
2890
|
-
};
|
|
2891
|
-
|
|
2892
|
-
const deserializeAws_json1_0EvaluateSessionResponse = (
|
|
2893
|
-
output: any,
|
|
2894
|
-
context: __SerdeContext
|
|
2895
|
-
): EvaluateSessionResponse => {
|
|
2896
|
-
return {
|
|
2897
|
-
AuthenticationResult:
|
|
2898
|
-
output.AuthenticationResult !== undefined && output.AuthenticationResult !== null
|
|
2899
|
-
? deserializeAws_json1_0AuthenticationResult(output.AuthenticationResult, context)
|
|
2900
|
-
: undefined,
|
|
2901
|
-
DomainId: __expectString(output.DomainId),
|
|
2902
|
-
FraudDetectionResult:
|
|
2903
|
-
output.FraudDetectionResult !== undefined && output.FraudDetectionResult !== null
|
|
2904
|
-
? deserializeAws_json1_0FraudDetectionResult(output.FraudDetectionResult, context)
|
|
2905
|
-
: undefined,
|
|
2906
|
-
SessionId: __expectString(output.SessionId),
|
|
2907
|
-
SessionName: __expectString(output.SessionName),
|
|
2908
|
-
StreamingStatus: __expectString(output.StreamingStatus),
|
|
2909
|
-
} as any;
|
|
2910
|
-
};
|
|
2911
|
-
|
|
2912
|
-
const deserializeAws_json1_0FailureDetails = (output: any, context: __SerdeContext): FailureDetails => {
|
|
2913
|
-
return {
|
|
2914
|
-
Message: __expectString(output.Message),
|
|
2915
|
-
StatusCode: __expectInt32(output.StatusCode),
|
|
2916
|
-
} as any;
|
|
2917
|
-
};
|
|
2918
|
-
|
|
2919
|
-
const deserializeAws_json1_0FraudDetectionConfiguration = (
|
|
2920
|
-
output: any,
|
|
2921
|
-
context: __SerdeContext
|
|
2922
|
-
): FraudDetectionConfiguration => {
|
|
2923
|
-
return {
|
|
2924
|
-
RiskThreshold: __expectInt32(output.RiskThreshold),
|
|
2925
|
-
} as any;
|
|
2926
|
-
};
|
|
2927
|
-
|
|
2928
|
-
const deserializeAws_json1_0FraudDetectionReasons = (
|
|
2929
|
-
output: any,
|
|
2930
|
-
context: __SerdeContext
|
|
2931
|
-
): (FraudDetectionReason | string)[] => {
|
|
2932
|
-
return (output || [])
|
|
2933
|
-
.filter((e: any) => e != null)
|
|
2934
|
-
.map((entry: any) => {
|
|
2935
|
-
if (entry === null) {
|
|
2936
|
-
return null as any;
|
|
2937
|
-
}
|
|
2938
|
-
return __expectString(entry) as any;
|
|
2939
|
-
});
|
|
2940
|
-
};
|
|
2941
|
-
|
|
2942
|
-
const deserializeAws_json1_0FraudDetectionResult = (output: any, context: __SerdeContext): FraudDetectionResult => {
|
|
2943
|
-
return {
|
|
2944
|
-
AudioAggregationEndedAt:
|
|
2945
|
-
output.AudioAggregationEndedAt !== undefined && output.AudioAggregationEndedAt !== null
|
|
2946
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AudioAggregationEndedAt)))
|
|
2947
|
-
: undefined,
|
|
2948
|
-
AudioAggregationStartedAt:
|
|
2949
|
-
output.AudioAggregationStartedAt !== undefined && output.AudioAggregationStartedAt !== null
|
|
2950
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AudioAggregationStartedAt)))
|
|
2951
|
-
: undefined,
|
|
2952
|
-
Configuration:
|
|
2953
|
-
output.Configuration !== undefined && output.Configuration !== null
|
|
2954
|
-
? deserializeAws_json1_0FraudDetectionConfiguration(output.Configuration, context)
|
|
2955
|
-
: undefined,
|
|
2956
|
-
Decision: __expectString(output.Decision),
|
|
2957
|
-
FraudDetectionResultId: __expectString(output.FraudDetectionResultId),
|
|
2958
|
-
Reasons:
|
|
2959
|
-
output.Reasons !== undefined && output.Reasons !== null
|
|
2960
|
-
? deserializeAws_json1_0FraudDetectionReasons(output.Reasons, context)
|
|
2961
|
-
: undefined,
|
|
2962
|
-
RiskDetails:
|
|
2963
|
-
output.RiskDetails !== undefined && output.RiskDetails !== null
|
|
2964
|
-
? deserializeAws_json1_0FraudRiskDetails(output.RiskDetails, context)
|
|
2965
|
-
: undefined,
|
|
2966
|
-
} as any;
|
|
2967
|
-
};
|
|
2968
|
-
|
|
2969
|
-
const deserializeAws_json1_0FraudRiskDetails = (output: any, context: __SerdeContext): FraudRiskDetails => {
|
|
2970
|
-
return {
|
|
2971
|
-
KnownFraudsterRisk:
|
|
2972
|
-
output.KnownFraudsterRisk !== undefined && output.KnownFraudsterRisk !== null
|
|
2973
|
-
? deserializeAws_json1_0KnownFraudsterRisk(output.KnownFraudsterRisk, context)
|
|
2974
|
-
: undefined,
|
|
2975
|
-
} as any;
|
|
2976
|
-
};
|
|
2977
|
-
|
|
2978
|
-
const deserializeAws_json1_0Fraudster = (output: any, context: __SerdeContext): Fraudster => {
|
|
2979
|
-
return {
|
|
2980
|
-
CreatedAt:
|
|
2981
|
-
output.CreatedAt !== undefined && output.CreatedAt !== null
|
|
2982
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
|
|
2983
|
-
: undefined,
|
|
2984
|
-
DomainId: __expectString(output.DomainId),
|
|
2985
|
-
GeneratedFraudsterId: __expectString(output.GeneratedFraudsterId),
|
|
2986
|
-
} as any;
|
|
2987
|
-
};
|
|
2988
|
-
|
|
2989
|
-
const deserializeAws_json1_0FraudsterRegistrationJob = (
|
|
2990
|
-
output: any,
|
|
2991
|
-
context: __SerdeContext
|
|
2992
|
-
): FraudsterRegistrationJob => {
|
|
2993
|
-
return {
|
|
2994
|
-
CreatedAt:
|
|
2995
|
-
output.CreatedAt !== undefined && output.CreatedAt !== null
|
|
2996
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
|
|
2997
|
-
: undefined,
|
|
2998
|
-
DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
|
|
2999
|
-
DomainId: __expectString(output.DomainId),
|
|
3000
|
-
EndedAt:
|
|
3001
|
-
output.EndedAt !== undefined && output.EndedAt !== null
|
|
3002
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndedAt)))
|
|
3003
|
-
: undefined,
|
|
3004
|
-
FailureDetails:
|
|
3005
|
-
output.FailureDetails !== undefined && output.FailureDetails !== null
|
|
3006
|
-
? deserializeAws_json1_0FailureDetails(output.FailureDetails, context)
|
|
3007
|
-
: undefined,
|
|
3008
|
-
InputDataConfig:
|
|
3009
|
-
output.InputDataConfig !== undefined && output.InputDataConfig !== null
|
|
3010
|
-
? deserializeAws_json1_0InputDataConfig(output.InputDataConfig, context)
|
|
3011
|
-
: undefined,
|
|
3012
|
-
JobId: __expectString(output.JobId),
|
|
3013
|
-
JobName: __expectString(output.JobName),
|
|
3014
|
-
JobProgress:
|
|
3015
|
-
output.JobProgress !== undefined && output.JobProgress !== null
|
|
3016
|
-
? deserializeAws_json1_0JobProgress(output.JobProgress, context)
|
|
3017
|
-
: undefined,
|
|
3018
|
-
JobStatus: __expectString(output.JobStatus),
|
|
3019
|
-
OutputDataConfig:
|
|
3020
|
-
output.OutputDataConfig !== undefined && output.OutputDataConfig !== null
|
|
3021
|
-
? deserializeAws_json1_0OutputDataConfig(output.OutputDataConfig, context)
|
|
3022
|
-
: undefined,
|
|
3023
|
-
RegistrationConfig:
|
|
3024
|
-
output.RegistrationConfig !== undefined && output.RegistrationConfig !== null
|
|
3025
|
-
? deserializeAws_json1_0RegistrationConfig(output.RegistrationConfig, context)
|
|
3026
|
-
: undefined,
|
|
3027
|
-
} as any;
|
|
3028
|
-
};
|
|
3029
|
-
|
|
3030
|
-
const deserializeAws_json1_0FraudsterRegistrationJobSummaries = (
|
|
3031
|
-
output: any,
|
|
3032
|
-
context: __SerdeContext
|
|
3033
|
-
): FraudsterRegistrationJobSummary[] => {
|
|
3034
|
-
return (output || [])
|
|
3035
|
-
.filter((e: any) => e != null)
|
|
3036
|
-
.map((entry: any) => {
|
|
3037
|
-
if (entry === null) {
|
|
3038
|
-
return null as any;
|
|
3039
|
-
}
|
|
3040
|
-
return deserializeAws_json1_0FraudsterRegistrationJobSummary(entry, context);
|
|
3041
|
-
});
|
|
3042
|
-
};
|
|
3043
|
-
|
|
3044
|
-
const deserializeAws_json1_0FraudsterRegistrationJobSummary = (
|
|
3045
|
-
output: any,
|
|
3046
|
-
context: __SerdeContext
|
|
3047
|
-
): FraudsterRegistrationJobSummary => {
|
|
3048
|
-
return {
|
|
3049
|
-
CreatedAt:
|
|
3050
|
-
output.CreatedAt !== undefined && output.CreatedAt !== null
|
|
3051
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
|
|
3052
|
-
: undefined,
|
|
3053
|
-
DomainId: __expectString(output.DomainId),
|
|
3054
|
-
EndedAt:
|
|
3055
|
-
output.EndedAt !== undefined && output.EndedAt !== null
|
|
3056
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndedAt)))
|
|
3057
|
-
: undefined,
|
|
3058
|
-
FailureDetails:
|
|
3059
|
-
output.FailureDetails !== undefined && output.FailureDetails !== null
|
|
3060
|
-
? deserializeAws_json1_0FailureDetails(output.FailureDetails, context)
|
|
3061
|
-
: undefined,
|
|
3062
|
-
JobId: __expectString(output.JobId),
|
|
3063
|
-
JobName: __expectString(output.JobName),
|
|
3064
|
-
JobProgress:
|
|
3065
|
-
output.JobProgress !== undefined && output.JobProgress !== null
|
|
3066
|
-
? deserializeAws_json1_0JobProgress(output.JobProgress, context)
|
|
3067
|
-
: undefined,
|
|
3068
|
-
JobStatus: __expectString(output.JobStatus),
|
|
3069
|
-
} as any;
|
|
3070
|
-
};
|
|
3071
|
-
|
|
3072
|
-
const deserializeAws_json1_0InputDataConfig = (output: any, context: __SerdeContext): InputDataConfig => {
|
|
3073
|
-
return {
|
|
3074
|
-
S3Uri: __expectString(output.S3Uri),
|
|
3075
|
-
} as any;
|
|
3076
|
-
};
|
|
3077
|
-
|
|
3078
|
-
const deserializeAws_json1_0InternalServerException = (
|
|
3079
|
-
output: any,
|
|
3080
|
-
context: __SerdeContext
|
|
3081
|
-
): InternalServerException => {
|
|
3082
|
-
return {
|
|
3083
|
-
Message: __expectString(output.Message),
|
|
3084
|
-
} as any;
|
|
3085
|
-
};
|
|
3086
|
-
|
|
3087
|
-
const deserializeAws_json1_0JobProgress = (output: any, context: __SerdeContext): JobProgress => {
|
|
3088
|
-
return {
|
|
3089
|
-
PercentComplete: __expectInt32(output.PercentComplete),
|
|
3090
|
-
} as any;
|
|
3091
|
-
};
|
|
3092
|
-
|
|
3093
|
-
const deserializeAws_json1_0KnownFraudsterRisk = (output: any, context: __SerdeContext): KnownFraudsterRisk => {
|
|
3094
|
-
return {
|
|
3095
|
-
GeneratedFraudsterId: __expectString(output.GeneratedFraudsterId),
|
|
3096
|
-
RiskScore: __expectInt32(output.RiskScore),
|
|
3097
|
-
} as any;
|
|
3098
|
-
};
|
|
3099
|
-
|
|
3100
|
-
const deserializeAws_json1_0ListDomainsResponse = (output: any, context: __SerdeContext): ListDomainsResponse => {
|
|
3101
|
-
return {
|
|
3102
|
-
DomainSummaries:
|
|
3103
|
-
output.DomainSummaries !== undefined && output.DomainSummaries !== null
|
|
3104
|
-
? deserializeAws_json1_0DomainSummaries(output.DomainSummaries, context)
|
|
3105
|
-
: undefined,
|
|
3106
|
-
NextToken: __expectString(output.NextToken),
|
|
3107
|
-
} as any;
|
|
3108
|
-
};
|
|
3109
|
-
|
|
3110
|
-
const deserializeAws_json1_0ListFraudsterRegistrationJobsResponse = (
|
|
3111
|
-
output: any,
|
|
3112
|
-
context: __SerdeContext
|
|
3113
|
-
): ListFraudsterRegistrationJobsResponse => {
|
|
3114
|
-
return {
|
|
3115
|
-
JobSummaries:
|
|
3116
|
-
output.JobSummaries !== undefined && output.JobSummaries !== null
|
|
3117
|
-
? deserializeAws_json1_0FraudsterRegistrationJobSummaries(output.JobSummaries, context)
|
|
3118
|
-
: undefined,
|
|
3119
|
-
NextToken: __expectString(output.NextToken),
|
|
3120
|
-
} as any;
|
|
3121
|
-
};
|
|
3122
|
-
|
|
3123
|
-
const deserializeAws_json1_0ListSpeakerEnrollmentJobsResponse = (
|
|
3124
|
-
output: any,
|
|
3125
|
-
context: __SerdeContext
|
|
3126
|
-
): ListSpeakerEnrollmentJobsResponse => {
|
|
3127
|
-
return {
|
|
3128
|
-
JobSummaries:
|
|
3129
|
-
output.JobSummaries !== undefined && output.JobSummaries !== null
|
|
3130
|
-
? deserializeAws_json1_0SpeakerEnrollmentJobSummaries(output.JobSummaries, context)
|
|
3131
|
-
: undefined,
|
|
3132
|
-
NextToken: __expectString(output.NextToken),
|
|
3133
|
-
} as any;
|
|
3134
|
-
};
|
|
3135
|
-
|
|
3136
|
-
const deserializeAws_json1_0ListSpeakersResponse = (output: any, context: __SerdeContext): ListSpeakersResponse => {
|
|
3137
|
-
return {
|
|
3138
|
-
NextToken: __expectString(output.NextToken),
|
|
3139
|
-
SpeakerSummaries:
|
|
3140
|
-
output.SpeakerSummaries !== undefined && output.SpeakerSummaries !== null
|
|
3141
|
-
? deserializeAws_json1_0SpeakerSummaries(output.SpeakerSummaries, context)
|
|
3142
|
-
: undefined,
|
|
3143
|
-
} as any;
|
|
3144
|
-
};
|
|
3145
|
-
|
|
3146
|
-
const deserializeAws_json1_0ListTagsForResourceResponse = (
|
|
3147
|
-
output: any,
|
|
3148
|
-
context: __SerdeContext
|
|
3149
|
-
): ListTagsForResourceResponse => {
|
|
3150
|
-
return {
|
|
3151
|
-
Tags:
|
|
3152
|
-
output.Tags !== undefined && output.Tags !== null
|
|
3153
|
-
? deserializeAws_json1_0TagList(output.Tags, context)
|
|
3154
|
-
: undefined,
|
|
3155
|
-
} as any;
|
|
3156
|
-
};
|
|
3157
|
-
|
|
3158
|
-
const deserializeAws_json1_0OptOutSpeakerResponse = (output: any, context: __SerdeContext): OptOutSpeakerResponse => {
|
|
3159
|
-
return {
|
|
3160
|
-
Speaker:
|
|
3161
|
-
output.Speaker !== undefined && output.Speaker !== null
|
|
3162
|
-
? deserializeAws_json1_0Speaker(output.Speaker, context)
|
|
3163
|
-
: undefined,
|
|
3164
|
-
} as any;
|
|
3165
|
-
};
|
|
3166
|
-
|
|
3167
|
-
const deserializeAws_json1_0OutputDataConfig = (output: any, context: __SerdeContext): OutputDataConfig => {
|
|
3168
|
-
return {
|
|
3169
|
-
KmsKeyId: __expectString(output.KmsKeyId),
|
|
3170
|
-
S3Uri: __expectString(output.S3Uri),
|
|
3171
|
-
} as any;
|
|
3172
|
-
};
|
|
3173
|
-
|
|
3174
|
-
const deserializeAws_json1_0RegistrationConfig = (output: any, context: __SerdeContext): RegistrationConfig => {
|
|
3175
|
-
return {
|
|
3176
|
-
DuplicateRegistrationAction: __expectString(output.DuplicateRegistrationAction),
|
|
3177
|
-
FraudsterSimilarityThreshold: __expectInt32(output.FraudsterSimilarityThreshold),
|
|
3178
|
-
} as any;
|
|
3179
|
-
};
|
|
3180
|
-
|
|
3181
|
-
const deserializeAws_json1_0ResourceNotFoundException = (
|
|
3182
|
-
output: any,
|
|
3183
|
-
context: __SerdeContext
|
|
3184
|
-
): ResourceNotFoundException => {
|
|
3185
|
-
return {
|
|
3186
|
-
Message: __expectString(output.Message),
|
|
3187
|
-
ResourceType: __expectString(output.ResourceType),
|
|
3188
|
-
} as any;
|
|
3189
|
-
};
|
|
3190
|
-
|
|
3191
|
-
const deserializeAws_json1_0ServerSideEncryptionConfiguration = (
|
|
3192
|
-
output: any,
|
|
3193
|
-
context: __SerdeContext
|
|
3194
|
-
): ServerSideEncryptionConfiguration => {
|
|
3195
|
-
return {
|
|
3196
|
-
KmsKeyId: __expectString(output.KmsKeyId),
|
|
3197
|
-
} as any;
|
|
3198
|
-
};
|
|
3199
|
-
|
|
3200
|
-
const deserializeAws_json1_0ServiceQuotaExceededException = (
|
|
3201
|
-
output: any,
|
|
3202
|
-
context: __SerdeContext
|
|
3203
|
-
): ServiceQuotaExceededException => {
|
|
3204
|
-
return {
|
|
3205
|
-
Message: __expectString(output.Message),
|
|
3206
|
-
} as any;
|
|
3207
|
-
};
|
|
3208
|
-
|
|
3209
|
-
const deserializeAws_json1_0Speaker = (output: any, context: __SerdeContext): Speaker => {
|
|
3210
|
-
return {
|
|
3211
|
-
CreatedAt:
|
|
3212
|
-
output.CreatedAt !== undefined && output.CreatedAt !== null
|
|
3213
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
|
|
3214
|
-
: undefined,
|
|
3215
|
-
CustomerSpeakerId: __expectString(output.CustomerSpeakerId),
|
|
3216
|
-
DomainId: __expectString(output.DomainId),
|
|
3217
|
-
GeneratedSpeakerId: __expectString(output.GeneratedSpeakerId),
|
|
3218
|
-
Status: __expectString(output.Status),
|
|
3219
|
-
UpdatedAt:
|
|
3220
|
-
output.UpdatedAt !== undefined && output.UpdatedAt !== null
|
|
3221
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt)))
|
|
3222
|
-
: undefined,
|
|
3223
|
-
} as any;
|
|
3224
|
-
};
|
|
3225
|
-
|
|
3226
|
-
const deserializeAws_json1_0SpeakerEnrollmentJob = (output: any, context: __SerdeContext): SpeakerEnrollmentJob => {
|
|
3227
|
-
return {
|
|
3228
|
-
CreatedAt:
|
|
3229
|
-
output.CreatedAt !== undefined && output.CreatedAt !== null
|
|
3230
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
|
|
3231
|
-
: undefined,
|
|
3232
|
-
DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
|
|
3233
|
-
DomainId: __expectString(output.DomainId),
|
|
3234
|
-
EndedAt:
|
|
3235
|
-
output.EndedAt !== undefined && output.EndedAt !== null
|
|
3236
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndedAt)))
|
|
3237
|
-
: undefined,
|
|
3238
|
-
EnrollmentConfig:
|
|
3239
|
-
output.EnrollmentConfig !== undefined && output.EnrollmentConfig !== null
|
|
3240
|
-
? deserializeAws_json1_0EnrollmentConfig(output.EnrollmentConfig, context)
|
|
3241
|
-
: undefined,
|
|
3242
|
-
FailureDetails:
|
|
3243
|
-
output.FailureDetails !== undefined && output.FailureDetails !== null
|
|
3244
|
-
? deserializeAws_json1_0FailureDetails(output.FailureDetails, context)
|
|
3245
|
-
: undefined,
|
|
3246
|
-
InputDataConfig:
|
|
3247
|
-
output.InputDataConfig !== undefined && output.InputDataConfig !== null
|
|
3248
|
-
? deserializeAws_json1_0InputDataConfig(output.InputDataConfig, context)
|
|
3249
|
-
: undefined,
|
|
3250
|
-
JobId: __expectString(output.JobId),
|
|
3251
|
-
JobName: __expectString(output.JobName),
|
|
3252
|
-
JobProgress:
|
|
3253
|
-
output.JobProgress !== undefined && output.JobProgress !== null
|
|
3254
|
-
? deserializeAws_json1_0JobProgress(output.JobProgress, context)
|
|
3255
|
-
: undefined,
|
|
3256
|
-
JobStatus: __expectString(output.JobStatus),
|
|
3257
|
-
OutputDataConfig:
|
|
3258
|
-
output.OutputDataConfig !== undefined && output.OutputDataConfig !== null
|
|
3259
|
-
? deserializeAws_json1_0OutputDataConfig(output.OutputDataConfig, context)
|
|
3260
|
-
: undefined,
|
|
3261
|
-
} as any;
|
|
3262
|
-
};
|
|
3263
|
-
|
|
3264
|
-
const deserializeAws_json1_0SpeakerEnrollmentJobSummaries = (
|
|
3265
|
-
output: any,
|
|
3266
|
-
context: __SerdeContext
|
|
3267
|
-
): SpeakerEnrollmentJobSummary[] => {
|
|
3268
|
-
return (output || [])
|
|
3269
|
-
.filter((e: any) => e != null)
|
|
3270
|
-
.map((entry: any) => {
|
|
3271
|
-
if (entry === null) {
|
|
3272
|
-
return null as any;
|
|
3273
|
-
}
|
|
3274
|
-
return deserializeAws_json1_0SpeakerEnrollmentJobSummary(entry, context);
|
|
3275
|
-
});
|
|
3276
|
-
};
|
|
3277
|
-
|
|
3278
|
-
const deserializeAws_json1_0SpeakerEnrollmentJobSummary = (
|
|
3279
|
-
output: any,
|
|
3280
|
-
context: __SerdeContext
|
|
3281
|
-
): SpeakerEnrollmentJobSummary => {
|
|
3282
|
-
return {
|
|
3283
|
-
CreatedAt:
|
|
3284
|
-
output.CreatedAt !== undefined && output.CreatedAt !== null
|
|
3285
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
|
|
3286
|
-
: undefined,
|
|
3287
|
-
DomainId: __expectString(output.DomainId),
|
|
3288
|
-
EndedAt:
|
|
3289
|
-
output.EndedAt !== undefined && output.EndedAt !== null
|
|
3290
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndedAt)))
|
|
3291
|
-
: undefined,
|
|
3292
|
-
FailureDetails:
|
|
3293
|
-
output.FailureDetails !== undefined && output.FailureDetails !== null
|
|
3294
|
-
? deserializeAws_json1_0FailureDetails(output.FailureDetails, context)
|
|
3295
|
-
: undefined,
|
|
3296
|
-
JobId: __expectString(output.JobId),
|
|
3297
|
-
JobName: __expectString(output.JobName),
|
|
3298
|
-
JobProgress:
|
|
3299
|
-
output.JobProgress !== undefined && output.JobProgress !== null
|
|
3300
|
-
? deserializeAws_json1_0JobProgress(output.JobProgress, context)
|
|
3301
|
-
: undefined,
|
|
3302
|
-
JobStatus: __expectString(output.JobStatus),
|
|
3303
|
-
} as any;
|
|
3304
|
-
};
|
|
3305
|
-
|
|
3306
|
-
const deserializeAws_json1_0SpeakerSummaries = (output: any, context: __SerdeContext): SpeakerSummary[] => {
|
|
3307
|
-
return (output || [])
|
|
3308
|
-
.filter((e: any) => e != null)
|
|
3309
|
-
.map((entry: any) => {
|
|
3310
|
-
if (entry === null) {
|
|
3311
|
-
return null as any;
|
|
3312
|
-
}
|
|
3313
|
-
return deserializeAws_json1_0SpeakerSummary(entry, context);
|
|
3314
|
-
});
|
|
3315
|
-
};
|
|
3316
|
-
|
|
3317
|
-
const deserializeAws_json1_0SpeakerSummary = (output: any, context: __SerdeContext): SpeakerSummary => {
|
|
3318
|
-
return {
|
|
3319
|
-
CreatedAt:
|
|
3320
|
-
output.CreatedAt !== undefined && output.CreatedAt !== null
|
|
3321
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
|
|
3322
|
-
: undefined,
|
|
3323
|
-
CustomerSpeakerId: __expectString(output.CustomerSpeakerId),
|
|
3324
|
-
DomainId: __expectString(output.DomainId),
|
|
3325
|
-
GeneratedSpeakerId: __expectString(output.GeneratedSpeakerId),
|
|
3326
|
-
Status: __expectString(output.Status),
|
|
3327
|
-
UpdatedAt:
|
|
3328
|
-
output.UpdatedAt !== undefined && output.UpdatedAt !== null
|
|
3329
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt)))
|
|
3330
|
-
: undefined,
|
|
3331
|
-
} as any;
|
|
3332
|
-
};
|
|
3333
|
-
|
|
3334
|
-
const deserializeAws_json1_0StartFraudsterRegistrationJobResponse = (
|
|
3335
|
-
output: any,
|
|
3336
|
-
context: __SerdeContext
|
|
3337
|
-
): StartFraudsterRegistrationJobResponse => {
|
|
3338
|
-
return {
|
|
3339
|
-
Job:
|
|
3340
|
-
output.Job !== undefined && output.Job !== null
|
|
3341
|
-
? deserializeAws_json1_0FraudsterRegistrationJob(output.Job, context)
|
|
3342
|
-
: undefined,
|
|
3343
|
-
} as any;
|
|
3344
|
-
};
|
|
3345
|
-
|
|
3346
|
-
const deserializeAws_json1_0StartSpeakerEnrollmentJobResponse = (
|
|
3347
|
-
output: any,
|
|
3348
|
-
context: __SerdeContext
|
|
3349
|
-
): StartSpeakerEnrollmentJobResponse => {
|
|
3350
|
-
return {
|
|
3351
|
-
Job:
|
|
3352
|
-
output.Job !== undefined && output.Job !== null
|
|
3353
|
-
? deserializeAws_json1_0SpeakerEnrollmentJob(output.Job, context)
|
|
3354
|
-
: undefined,
|
|
3355
|
-
} as any;
|
|
3356
|
-
};
|
|
3357
|
-
|
|
3358
|
-
const deserializeAws_json1_0Tag = (output: any, context: __SerdeContext): Tag => {
|
|
3359
|
-
return {
|
|
3360
|
-
Key: __expectString(output.Key),
|
|
3361
|
-
Value: __expectString(output.Value),
|
|
3362
|
-
} as any;
|
|
3363
|
-
};
|
|
3364
|
-
|
|
3365
|
-
const deserializeAws_json1_0TagList = (output: any, context: __SerdeContext): Tag[] => {
|
|
3366
|
-
return (output || [])
|
|
3367
|
-
.filter((e: any) => e != null)
|
|
3368
|
-
.map((entry: any) => {
|
|
3369
|
-
if (entry === null) {
|
|
3370
|
-
return null as any;
|
|
3371
|
-
}
|
|
3372
|
-
return deserializeAws_json1_0Tag(entry, context);
|
|
3373
|
-
});
|
|
3374
|
-
};
|
|
3375
|
-
|
|
3376
|
-
const deserializeAws_json1_0TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => {
|
|
3377
|
-
return {} as any;
|
|
3378
|
-
};
|
|
3379
|
-
|
|
3380
|
-
const deserializeAws_json1_0ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => {
|
|
3381
|
-
return {
|
|
3382
|
-
Message: __expectString(output.Message),
|
|
3383
|
-
} as any;
|
|
3384
|
-
};
|
|
3385
|
-
|
|
3386
|
-
const deserializeAws_json1_0UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => {
|
|
3387
|
-
return {} as any;
|
|
3388
|
-
};
|
|
3389
|
-
|
|
3390
|
-
const deserializeAws_json1_0UpdateDomainResponse = (output: any, context: __SerdeContext): UpdateDomainResponse => {
|
|
3391
|
-
return {
|
|
3392
|
-
Domain:
|
|
3393
|
-
output.Domain !== undefined && output.Domain !== null
|
|
3394
|
-
? deserializeAws_json1_0Domain(output.Domain, context)
|
|
3395
|
-
: undefined,
|
|
3396
|
-
} as any;
|
|
3397
|
-
};
|
|
3398
|
-
|
|
3399
|
-
const deserializeAws_json1_0ValidationException = (output: any, context: __SerdeContext): ValidationException => {
|
|
3400
|
-
return {
|
|
3401
|
-
Message: __expectString(output.Message),
|
|
3402
|
-
} as any;
|
|
3403
|
-
};
|
|
3404
|
-
|
|
3405
|
-
const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
|
|
3406
|
-
httpStatusCode: output.statusCode,
|
|
3407
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
3408
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
3409
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
3410
|
-
});
|
|
3411
|
-
|
|
3412
|
-
// Collect low-level response body stream to Uint8Array.
|
|
3413
|
-
const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
|
|
3414
|
-
if (streamBody instanceof Uint8Array) {
|
|
3415
|
-
return Promise.resolve(streamBody);
|
|
3416
|
-
}
|
|
3417
|
-
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
3418
|
-
};
|
|
3419
|
-
|
|
3420
|
-
// Encode Uint8Array data into string with utf-8.
|
|
3421
|
-
const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
|
|
3422
|
-
collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
3423
|
-
|
|
3424
|
-
const buildHttpRpcRequest = async (
|
|
3425
|
-
context: __SerdeContext,
|
|
3426
|
-
headers: __HeaderBag,
|
|
3427
|
-
path: string,
|
|
3428
|
-
resolvedHostname: string | undefined,
|
|
3429
|
-
body: any
|
|
3430
|
-
): Promise<__HttpRequest> => {
|
|
3431
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
3432
|
-
const contents: any = {
|
|
3433
|
-
protocol,
|
|
3434
|
-
hostname,
|
|
3435
|
-
port,
|
|
3436
|
-
method: "POST",
|
|
3437
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
3438
|
-
headers,
|
|
3439
|
-
};
|
|
3440
|
-
if (resolvedHostname !== undefined) {
|
|
3441
|
-
contents.hostname = resolvedHostname;
|
|
3442
|
-
}
|
|
3443
|
-
if (body !== undefined) {
|
|
3444
|
-
contents.body = body;
|
|
3445
|
-
}
|
|
3446
|
-
return new __HttpRequest(contents);
|
|
3447
|
-
};
|
|
3448
|
-
|
|
3449
|
-
const parseBody = (streamBody: any, context: __SerdeContext): any =>
|
|
3450
|
-
collectBodyString(streamBody, context).then((encoded) => {
|
|
3451
|
-
if (encoded.length) {
|
|
3452
|
-
return JSON.parse(encoded);
|
|
3453
|
-
}
|
|
3454
|
-
return {};
|
|
3455
|
-
});
|
|
3456
|
-
|
|
3457
|
-
/**
|
|
3458
|
-
* Load an error code for the aws.rest-json-1.1 protocol.
|
|
3459
|
-
*/
|
|
3460
|
-
const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => {
|
|
3461
|
-
const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
3462
|
-
|
|
3463
|
-
const sanitizeErrorCode = (rawValue: string): string => {
|
|
3464
|
-
let cleanValue = rawValue;
|
|
3465
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
3466
|
-
cleanValue = cleanValue.split(":")[0];
|
|
3467
|
-
}
|
|
3468
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
3469
|
-
cleanValue = cleanValue.split("#")[1];
|
|
3470
|
-
}
|
|
3471
|
-
return cleanValue;
|
|
3472
|
-
};
|
|
3473
|
-
|
|
3474
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
3475
|
-
if (headerKey !== undefined) {
|
|
3476
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
3477
|
-
}
|
|
3478
|
-
|
|
3479
|
-
if (data.code !== undefined) {
|
|
3480
|
-
return sanitizeErrorCode(data.code);
|
|
3481
|
-
}
|
|
3482
|
-
|
|
3483
|
-
if (data["__type"] !== undefined) {
|
|
3484
|
-
return sanitizeErrorCode(data["__type"]);
|
|
3485
|
-
}
|
|
3486
|
-
|
|
3487
|
-
return "";
|
|
3488
|
-
};
|