@aws-sdk/client-polly 3.183.0 → 3.186.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 +19 -0
- package/dist-cjs/protocols/Aws_restJson1.js +2 -2
- package/dist-es/Polly.js +45 -38
- package/dist-es/PollyClient.js +28 -22
- package/dist-es/commands/DeleteLexiconCommand.js +28 -21
- package/dist-es/commands/DescribeVoicesCommand.js +28 -21
- package/dist-es/commands/GetLexiconCommand.js +28 -21
- package/dist-es/commands/GetSpeechSynthesisTaskCommand.js +28 -21
- package/dist-es/commands/ListLexiconsCommand.js +28 -21
- package/dist-es/commands/ListSpeechSynthesisTasksCommand.js +28 -21
- package/dist-es/commands/PutLexiconCommand.js +28 -21
- package/dist-es/commands/StartSpeechSynthesisTaskCommand.js +28 -21
- package/dist-es/commands/SynthesizeSpeechCommand.js +28 -21
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/PollyServiceException.js +10 -5
- package/dist-es/models/models_0.js +255 -303
- package/dist-es/pagination/ListSpeechSynthesisTasksPaginator.js +68 -25
- package/dist-es/protocols/Aws_restJson1.js +1154 -878
- package/dist-es/runtimeConfig.browser.js +12 -26
- package/dist-es/runtimeConfig.js +12 -30
- package/dist-es/runtimeConfig.native.js +5 -8
- package/dist-es/runtimeConfig.shared.js +11 -8
- package/package.json +33 -33
|
@@ -1,881 +1,1139 @@
|
|
|
1
|
+
import { __assign, __awaiter, __generator } from "tslib";
|
|
1
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
3
|
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
3
4
|
import { EngineNotSupportedException, InvalidLexiconException, InvalidNextTokenException, InvalidS3BucketException, InvalidS3KeyException, InvalidSampleRateException, InvalidSnsTopicArnException, InvalidSsmlException, InvalidTaskIdException, LanguageNotSupportedException, LexiconNotFoundException, LexiconSizeExceededException, MarksNotSupportedForFormatException, MaxLexemeLengthExceededException, MaxLexiconsNumberExceededException, ServiceFailureException, SsmlMarksNotSupportedForTextTypeException, SynthesisTaskNotFoundException, TextLengthExceededException, UnsupportedPlsAlphabetException, UnsupportedPlsLanguageException, } from "../models/models_0";
|
|
4
5
|
import { PollyServiceException as __BaseException } from "../models/PollyServiceException";
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
export var serializeAws_restJson1DeleteLexiconCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
8
|
+
return __generator(this, function (_c) {
|
|
9
|
+
switch (_c.label) {
|
|
10
|
+
case 0: return [4, context.endpoint()];
|
|
11
|
+
case 1:
|
|
12
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
13
|
+
headers = {};
|
|
14
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/lexicons/{Name}";
|
|
15
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
|
|
16
|
+
return [2, new __HttpRequest({
|
|
17
|
+
protocol: protocol,
|
|
18
|
+
hostname: hostname,
|
|
19
|
+
port: port,
|
|
20
|
+
method: "DELETE",
|
|
21
|
+
headers: headers,
|
|
22
|
+
path: resolvedPath,
|
|
23
|
+
body: body,
|
|
24
|
+
})];
|
|
25
|
+
}
|
|
19
26
|
});
|
|
20
|
-
};
|
|
21
|
-
export
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
}); };
|
|
28
|
+
export var serializeAws_restJson1DescribeVoicesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
29
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
30
|
+
return __generator(this, function (_c) {
|
|
31
|
+
switch (_c.label) {
|
|
32
|
+
case 0: return [4, context.endpoint()];
|
|
33
|
+
case 1:
|
|
34
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
35
|
+
headers = {};
|
|
36
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/voices";
|
|
37
|
+
query = map({
|
|
38
|
+
Engine: [, input.Engine],
|
|
39
|
+
LanguageCode: [, input.LanguageCode],
|
|
40
|
+
IncludeAdditionalLanguageCodes: [
|
|
41
|
+
function () { return input.IncludeAdditionalLanguageCodes !== void 0; },
|
|
42
|
+
function () { return input.IncludeAdditionalLanguageCodes.toString(); },
|
|
43
|
+
],
|
|
44
|
+
NextToken: [, input.NextToken],
|
|
45
|
+
});
|
|
46
|
+
return [2, new __HttpRequest({
|
|
47
|
+
protocol: protocol,
|
|
48
|
+
hostname: hostname,
|
|
49
|
+
port: port,
|
|
50
|
+
method: "GET",
|
|
51
|
+
headers: headers,
|
|
52
|
+
path: resolvedPath,
|
|
53
|
+
query: query,
|
|
54
|
+
body: body,
|
|
55
|
+
})];
|
|
56
|
+
}
|
|
33
57
|
});
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
58
|
+
}); };
|
|
59
|
+
export var serializeAws_restJson1GetLexiconCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
60
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
61
|
+
return __generator(this, function (_c) {
|
|
62
|
+
switch (_c.label) {
|
|
63
|
+
case 0: return [4, context.endpoint()];
|
|
64
|
+
case 1:
|
|
65
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
66
|
+
headers = {};
|
|
67
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/lexicons/{Name}";
|
|
68
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
|
|
69
|
+
return [2, new __HttpRequest({
|
|
70
|
+
protocol: protocol,
|
|
71
|
+
hostname: hostname,
|
|
72
|
+
port: port,
|
|
73
|
+
method: "GET",
|
|
74
|
+
headers: headers,
|
|
75
|
+
path: resolvedPath,
|
|
76
|
+
body: body,
|
|
77
|
+
})];
|
|
78
|
+
}
|
|
44
79
|
});
|
|
45
|
-
};
|
|
46
|
-
export
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
80
|
+
}); };
|
|
81
|
+
export var serializeAws_restJson1GetSpeechSynthesisTaskCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
82
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
83
|
+
return __generator(this, function (_c) {
|
|
84
|
+
switch (_c.label) {
|
|
85
|
+
case 0: return [4, context.endpoint()];
|
|
86
|
+
case 1:
|
|
87
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
88
|
+
headers = {};
|
|
89
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/synthesisTasks/{TaskId}";
|
|
90
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "TaskId", function () { return input.TaskId; }, "{TaskId}", false);
|
|
91
|
+
return [2, new __HttpRequest({
|
|
92
|
+
protocol: protocol,
|
|
93
|
+
hostname: hostname,
|
|
94
|
+
port: port,
|
|
95
|
+
method: "GET",
|
|
96
|
+
headers: headers,
|
|
97
|
+
path: resolvedPath,
|
|
98
|
+
body: body,
|
|
99
|
+
})];
|
|
100
|
+
}
|
|
60
101
|
});
|
|
61
|
-
};
|
|
62
|
-
export
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
102
|
+
}); };
|
|
103
|
+
export var serializeAws_restJson1ListLexiconsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
104
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
105
|
+
return __generator(this, function (_c) {
|
|
106
|
+
switch (_c.label) {
|
|
107
|
+
case 0: return [4, context.endpoint()];
|
|
108
|
+
case 1:
|
|
109
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
110
|
+
headers = {};
|
|
111
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/lexicons";
|
|
112
|
+
query = map({
|
|
113
|
+
NextToken: [, input.NextToken],
|
|
114
|
+
});
|
|
115
|
+
return [2, new __HttpRequest({
|
|
116
|
+
protocol: protocol,
|
|
117
|
+
hostname: hostname,
|
|
118
|
+
port: port,
|
|
119
|
+
method: "GET",
|
|
120
|
+
headers: headers,
|
|
121
|
+
path: resolvedPath,
|
|
122
|
+
query: query,
|
|
123
|
+
body: body,
|
|
124
|
+
})];
|
|
125
|
+
}
|
|
76
126
|
});
|
|
77
|
-
};
|
|
78
|
-
export
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
127
|
+
}); };
|
|
128
|
+
export var serializeAws_restJson1ListSpeechSynthesisTasksCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
129
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
130
|
+
return __generator(this, function (_c) {
|
|
131
|
+
switch (_c.label) {
|
|
132
|
+
case 0: return [4, context.endpoint()];
|
|
133
|
+
case 1:
|
|
134
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
135
|
+
headers = {};
|
|
136
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/synthesisTasks";
|
|
137
|
+
query = map({
|
|
138
|
+
MaxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
|
|
139
|
+
NextToken: [, input.NextToken],
|
|
140
|
+
Status: [, input.Status],
|
|
141
|
+
});
|
|
142
|
+
return [2, new __HttpRequest({
|
|
143
|
+
protocol: protocol,
|
|
144
|
+
hostname: hostname,
|
|
145
|
+
port: port,
|
|
146
|
+
method: "GET",
|
|
147
|
+
headers: headers,
|
|
148
|
+
path: resolvedPath,
|
|
149
|
+
query: query,
|
|
150
|
+
body: body,
|
|
151
|
+
})];
|
|
152
|
+
}
|
|
84
153
|
});
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
154
|
+
}); };
|
|
155
|
+
export var serializeAws_restJson1PutLexiconCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
156
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
157
|
+
return __generator(this, function (_c) {
|
|
158
|
+
switch (_c.label) {
|
|
159
|
+
case 0: return [4, context.endpoint()];
|
|
160
|
+
case 1:
|
|
161
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
162
|
+
headers = {
|
|
163
|
+
"content-type": "application/json",
|
|
164
|
+
};
|
|
165
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/lexicons/{Name}";
|
|
166
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
|
|
167
|
+
body = JSON.stringify(__assign({}, (input.Content != null && { Content: input.Content })));
|
|
168
|
+
return [2, new __HttpRequest({
|
|
169
|
+
protocol: protocol,
|
|
170
|
+
hostname: hostname,
|
|
171
|
+
port: port,
|
|
172
|
+
method: "PUT",
|
|
173
|
+
headers: headers,
|
|
174
|
+
path: resolvedPath,
|
|
175
|
+
body: body,
|
|
176
|
+
})];
|
|
177
|
+
}
|
|
95
178
|
});
|
|
96
|
-
};
|
|
97
|
-
export
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
179
|
+
}); };
|
|
180
|
+
export var serializeAws_restJson1StartSpeechSynthesisTaskCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
181
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
182
|
+
return __generator(this, function (_c) {
|
|
183
|
+
switch (_c.label) {
|
|
184
|
+
case 0: return [4, context.endpoint()];
|
|
185
|
+
case 1:
|
|
186
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
187
|
+
headers = {
|
|
188
|
+
"content-type": "application/json",
|
|
189
|
+
};
|
|
190
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/synthesisTasks";
|
|
191
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Engine != null && { Engine: input.Engine })), (input.LanguageCode != null && { LanguageCode: input.LanguageCode })), (input.LexiconNames != null && {
|
|
192
|
+
LexiconNames: serializeAws_restJson1LexiconNameList(input.LexiconNames, context),
|
|
193
|
+
})), (input.OutputFormat != null && { OutputFormat: input.OutputFormat })), (input.OutputS3BucketName != null && { OutputS3BucketName: input.OutputS3BucketName })), (input.OutputS3KeyPrefix != null && { OutputS3KeyPrefix: input.OutputS3KeyPrefix })), (input.SampleRate != null && { SampleRate: input.SampleRate })), (input.SnsTopicArn != null && { SnsTopicArn: input.SnsTopicArn })), (input.SpeechMarkTypes != null && {
|
|
194
|
+
SpeechMarkTypes: serializeAws_restJson1SpeechMarkTypeList(input.SpeechMarkTypes, context),
|
|
195
|
+
})), (input.Text != null && { Text: input.Text })), (input.TextType != null && { TextType: input.TextType })), (input.VoiceId != null && { VoiceId: input.VoiceId })));
|
|
196
|
+
return [2, new __HttpRequest({
|
|
197
|
+
protocol: protocol,
|
|
198
|
+
hostname: hostname,
|
|
199
|
+
port: port,
|
|
200
|
+
method: "POST",
|
|
201
|
+
headers: headers,
|
|
202
|
+
path: resolvedPath,
|
|
203
|
+
body: body,
|
|
204
|
+
})];
|
|
205
|
+
}
|
|
105
206
|
});
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
207
|
+
}); };
|
|
208
|
+
export var serializeAws_restJson1SynthesizeSpeechCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
209
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
210
|
+
return __generator(this, function (_c) {
|
|
211
|
+
switch (_c.label) {
|
|
212
|
+
case 0: return [4, context.endpoint()];
|
|
213
|
+
case 1:
|
|
214
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
215
|
+
headers = {
|
|
216
|
+
"content-type": "application/json",
|
|
217
|
+
};
|
|
218
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/speech";
|
|
219
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Engine != null && { Engine: input.Engine })), (input.LanguageCode != null && { LanguageCode: input.LanguageCode })), (input.LexiconNames != null && {
|
|
220
|
+
LexiconNames: serializeAws_restJson1LexiconNameList(input.LexiconNames, context),
|
|
221
|
+
})), (input.OutputFormat != null && { OutputFormat: input.OutputFormat })), (input.SampleRate != null && { SampleRate: input.SampleRate })), (input.SpeechMarkTypes != null && {
|
|
222
|
+
SpeechMarkTypes: serializeAws_restJson1SpeechMarkTypeList(input.SpeechMarkTypes, context),
|
|
223
|
+
})), (input.Text != null && { Text: input.Text })), (input.TextType != null && { TextType: input.TextType })), (input.VoiceId != null && { VoiceId: input.VoiceId })));
|
|
224
|
+
return [2, new __HttpRequest({
|
|
225
|
+
protocol: protocol,
|
|
226
|
+
hostname: hostname,
|
|
227
|
+
port: port,
|
|
228
|
+
method: "POST",
|
|
229
|
+
headers: headers,
|
|
230
|
+
path: resolvedPath,
|
|
231
|
+
body: body,
|
|
232
|
+
})];
|
|
233
|
+
}
|
|
116
234
|
});
|
|
117
|
-
};
|
|
118
|
-
export
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
235
|
+
}); };
|
|
236
|
+
export var deserializeAws_restJson1DeleteLexiconCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
237
|
+
var contents;
|
|
238
|
+
return __generator(this, function (_a) {
|
|
239
|
+
switch (_a.label) {
|
|
240
|
+
case 0:
|
|
241
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
242
|
+
return [2, deserializeAws_restJson1DeleteLexiconCommandError(output, context)];
|
|
243
|
+
}
|
|
244
|
+
contents = map({
|
|
245
|
+
$metadata: deserializeMetadata(output),
|
|
246
|
+
});
|
|
247
|
+
return [4, collectBody(output.body, context)];
|
|
248
|
+
case 1:
|
|
249
|
+
_a.sent();
|
|
250
|
+
return [2, contents];
|
|
251
|
+
}
|
|
128
252
|
});
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
253
|
+
}); };
|
|
254
|
+
var deserializeAws_restJson1DeleteLexiconCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
255
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
256
|
+
var _c;
|
|
257
|
+
return __generator(this, function (_d) {
|
|
258
|
+
switch (_d.label) {
|
|
259
|
+
case 0:
|
|
260
|
+
_a = [__assign({}, output)];
|
|
261
|
+
_c = {};
|
|
262
|
+
return [4, parseErrorBody(output.body, context)];
|
|
263
|
+
case 1:
|
|
264
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
265
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
266
|
+
_b = errorCode;
|
|
267
|
+
switch (_b) {
|
|
268
|
+
case "LexiconNotFoundException": return [3, 2];
|
|
269
|
+
case "com.amazonaws.polly#LexiconNotFoundException": return [3, 2];
|
|
270
|
+
case "ServiceFailureException": return [3, 4];
|
|
271
|
+
case "com.amazonaws.polly#ServiceFailureException": return [3, 4];
|
|
272
|
+
}
|
|
273
|
+
return [3, 6];
|
|
274
|
+
case 2: return [4, deserializeAws_restJson1LexiconNotFoundExceptionResponse(parsedOutput, context)];
|
|
275
|
+
case 3: throw _d.sent();
|
|
276
|
+
case 4: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
|
|
277
|
+
case 5: throw _d.sent();
|
|
278
|
+
case 6:
|
|
279
|
+
parsedBody = parsedOutput.body;
|
|
280
|
+
throwDefaultError({
|
|
281
|
+
output: output,
|
|
282
|
+
parsedBody: parsedBody,
|
|
283
|
+
exceptionCtor: __BaseException,
|
|
284
|
+
errorCode: errorCode,
|
|
285
|
+
});
|
|
286
|
+
_d.label = 7;
|
|
287
|
+
case 7: return [2];
|
|
288
|
+
}
|
|
137
289
|
});
|
|
138
|
-
};
|
|
139
|
-
export
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
290
|
+
}); };
|
|
291
|
+
export var deserializeAws_restJson1DescribeVoicesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
292
|
+
var contents, data, _a, _b;
|
|
293
|
+
return __generator(this, function (_c) {
|
|
294
|
+
switch (_c.label) {
|
|
295
|
+
case 0:
|
|
296
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
297
|
+
return [2, deserializeAws_restJson1DescribeVoicesCommandError(output, context)];
|
|
298
|
+
}
|
|
299
|
+
contents = map({
|
|
300
|
+
$metadata: deserializeMetadata(output),
|
|
301
|
+
});
|
|
302
|
+
_a = __expectNonNull;
|
|
303
|
+
_b = __expectObject;
|
|
304
|
+
return [4, parseBody(output.body, context)];
|
|
305
|
+
case 1:
|
|
306
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
307
|
+
if (data.NextToken != null) {
|
|
308
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
309
|
+
}
|
|
310
|
+
if (data.Voices != null) {
|
|
311
|
+
contents.Voices = deserializeAws_restJson1VoiceList(data.Voices, context);
|
|
312
|
+
}
|
|
313
|
+
return [2, contents];
|
|
314
|
+
}
|
|
163
315
|
});
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
316
|
+
}); };
|
|
317
|
+
var deserializeAws_restJson1DescribeVoicesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
318
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
319
|
+
var _c;
|
|
320
|
+
return __generator(this, function (_d) {
|
|
321
|
+
switch (_d.label) {
|
|
322
|
+
case 0:
|
|
323
|
+
_a = [__assign({}, output)];
|
|
324
|
+
_c = {};
|
|
325
|
+
return [4, parseErrorBody(output.body, context)];
|
|
326
|
+
case 1:
|
|
327
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
328
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
329
|
+
_b = errorCode;
|
|
330
|
+
switch (_b) {
|
|
331
|
+
case "InvalidNextTokenException": return [3, 2];
|
|
332
|
+
case "com.amazonaws.polly#InvalidNextTokenException": return [3, 2];
|
|
333
|
+
case "ServiceFailureException": return [3, 4];
|
|
334
|
+
case "com.amazonaws.polly#ServiceFailureException": return [3, 4];
|
|
335
|
+
}
|
|
336
|
+
return [3, 6];
|
|
337
|
+
case 2: return [4, deserializeAws_restJson1InvalidNextTokenExceptionResponse(parsedOutput, context)];
|
|
338
|
+
case 3: throw _d.sent();
|
|
339
|
+
case 4: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
|
|
340
|
+
case 5: throw _d.sent();
|
|
341
|
+
case 6:
|
|
342
|
+
parsedBody = parsedOutput.body;
|
|
343
|
+
throwDefaultError({
|
|
344
|
+
output: output,
|
|
345
|
+
parsedBody: parsedBody,
|
|
346
|
+
exceptionCtor: __BaseException,
|
|
347
|
+
errorCode: errorCode,
|
|
348
|
+
});
|
|
349
|
+
_d.label = 7;
|
|
350
|
+
case 7: return [2];
|
|
351
|
+
}
|
|
172
352
|
});
|
|
173
|
-
};
|
|
174
|
-
export
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
353
|
+
}); };
|
|
354
|
+
export var deserializeAws_restJson1GetLexiconCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
355
|
+
var contents, data, _a, _b;
|
|
356
|
+
return __generator(this, function (_c) {
|
|
357
|
+
switch (_c.label) {
|
|
358
|
+
case 0:
|
|
359
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
360
|
+
return [2, deserializeAws_restJson1GetLexiconCommandError(output, context)];
|
|
361
|
+
}
|
|
362
|
+
contents = map({
|
|
363
|
+
$metadata: deserializeMetadata(output),
|
|
364
|
+
});
|
|
365
|
+
_a = __expectNonNull;
|
|
366
|
+
_b = __expectObject;
|
|
367
|
+
return [4, parseBody(output.body, context)];
|
|
368
|
+
case 1:
|
|
369
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
370
|
+
if (data.Lexicon != null) {
|
|
371
|
+
contents.Lexicon = deserializeAws_restJson1Lexicon(data.Lexicon, context);
|
|
372
|
+
}
|
|
373
|
+
if (data.LexiconAttributes != null) {
|
|
374
|
+
contents.LexiconAttributes = deserializeAws_restJson1LexiconAttributes(data.LexiconAttributes, context);
|
|
375
|
+
}
|
|
376
|
+
return [2, contents];
|
|
377
|
+
}
|
|
195
378
|
});
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
379
|
+
}); };
|
|
380
|
+
var deserializeAws_restJson1GetLexiconCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
381
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
382
|
+
var _c;
|
|
383
|
+
return __generator(this, function (_d) {
|
|
384
|
+
switch (_d.label) {
|
|
385
|
+
case 0:
|
|
386
|
+
_a = [__assign({}, output)];
|
|
387
|
+
_c = {};
|
|
388
|
+
return [4, parseErrorBody(output.body, context)];
|
|
389
|
+
case 1:
|
|
390
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
391
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
392
|
+
_b = errorCode;
|
|
393
|
+
switch (_b) {
|
|
394
|
+
case "LexiconNotFoundException": return [3, 2];
|
|
395
|
+
case "com.amazonaws.polly#LexiconNotFoundException": return [3, 2];
|
|
396
|
+
case "ServiceFailureException": return [3, 4];
|
|
397
|
+
case "com.amazonaws.polly#ServiceFailureException": return [3, 4];
|
|
398
|
+
}
|
|
399
|
+
return [3, 6];
|
|
400
|
+
case 2: return [4, deserializeAws_restJson1LexiconNotFoundExceptionResponse(parsedOutput, context)];
|
|
401
|
+
case 3: throw _d.sent();
|
|
402
|
+
case 4: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
|
|
403
|
+
case 5: throw _d.sent();
|
|
404
|
+
case 6:
|
|
405
|
+
parsedBody = parsedOutput.body;
|
|
406
|
+
throwDefaultError({
|
|
407
|
+
output: output,
|
|
408
|
+
parsedBody: parsedBody,
|
|
409
|
+
exceptionCtor: __BaseException,
|
|
410
|
+
errorCode: errorCode,
|
|
411
|
+
});
|
|
412
|
+
_d.label = 7;
|
|
413
|
+
case 7: return [2];
|
|
414
|
+
}
|
|
204
415
|
});
|
|
205
|
-
};
|
|
206
|
-
export
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
416
|
+
}); };
|
|
417
|
+
export var deserializeAws_restJson1GetSpeechSynthesisTaskCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
418
|
+
var contents, data, _a, _b;
|
|
419
|
+
return __generator(this, function (_c) {
|
|
420
|
+
switch (_c.label) {
|
|
421
|
+
case 0:
|
|
422
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
423
|
+
return [2, deserializeAws_restJson1GetSpeechSynthesisTaskCommandError(output, context)];
|
|
424
|
+
}
|
|
425
|
+
contents = map({
|
|
426
|
+
$metadata: deserializeMetadata(output),
|
|
427
|
+
});
|
|
428
|
+
_a = __expectNonNull;
|
|
429
|
+
_b = __expectObject;
|
|
430
|
+
return [4, parseBody(output.body, context)];
|
|
431
|
+
case 1:
|
|
432
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
433
|
+
if (data.SynthesisTask != null) {
|
|
434
|
+
contents.SynthesisTask = deserializeAws_restJson1SynthesisTask(data.SynthesisTask, context);
|
|
435
|
+
}
|
|
436
|
+
return [2, contents];
|
|
437
|
+
}
|
|
212
438
|
});
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
439
|
+
}); };
|
|
440
|
+
var deserializeAws_restJson1GetSpeechSynthesisTaskCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
441
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
442
|
+
var _c;
|
|
443
|
+
return __generator(this, function (_d) {
|
|
444
|
+
switch (_d.label) {
|
|
445
|
+
case 0:
|
|
446
|
+
_a = [__assign({}, output)];
|
|
447
|
+
_c = {};
|
|
448
|
+
return [4, parseErrorBody(output.body, context)];
|
|
449
|
+
case 1:
|
|
450
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
451
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
452
|
+
_b = errorCode;
|
|
453
|
+
switch (_b) {
|
|
454
|
+
case "InvalidTaskIdException": return [3, 2];
|
|
455
|
+
case "com.amazonaws.polly#InvalidTaskIdException": return [3, 2];
|
|
456
|
+
case "ServiceFailureException": return [3, 4];
|
|
457
|
+
case "com.amazonaws.polly#ServiceFailureException": return [3, 4];
|
|
458
|
+
case "SynthesisTaskNotFoundException": return [3, 6];
|
|
459
|
+
case "com.amazonaws.polly#SynthesisTaskNotFoundException": return [3, 6];
|
|
460
|
+
}
|
|
461
|
+
return [3, 8];
|
|
462
|
+
case 2: return [4, deserializeAws_restJson1InvalidTaskIdExceptionResponse(parsedOutput, context)];
|
|
463
|
+
case 3: throw _d.sent();
|
|
464
|
+
case 4: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
|
|
465
|
+
case 5: throw _d.sent();
|
|
466
|
+
case 6: return [4, deserializeAws_restJson1SynthesisTaskNotFoundExceptionResponse(parsedOutput, context)];
|
|
467
|
+
case 7: throw _d.sent();
|
|
468
|
+
case 8:
|
|
469
|
+
parsedBody = parsedOutput.body;
|
|
470
|
+
throwDefaultError({
|
|
471
|
+
output: output,
|
|
472
|
+
parsedBody: parsedBody,
|
|
473
|
+
exceptionCtor: __BaseException,
|
|
474
|
+
errorCode: errorCode,
|
|
475
|
+
});
|
|
476
|
+
_d.label = 9;
|
|
477
|
+
case 9: return [2];
|
|
478
|
+
}
|
|
245
479
|
});
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
output,
|
|
272
|
-
parsedBody,
|
|
273
|
-
exceptionCtor: __BaseException,
|
|
274
|
-
errorCode,
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
};
|
|
278
|
-
export const deserializeAws_restJson1GetLexiconCommand = async (output, context) => {
|
|
279
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
280
|
-
return deserializeAws_restJson1GetLexiconCommandError(output, context);
|
|
281
|
-
}
|
|
282
|
-
const contents = map({
|
|
283
|
-
$metadata: deserializeMetadata(output),
|
|
480
|
+
}); };
|
|
481
|
+
export var deserializeAws_restJson1ListLexiconsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
482
|
+
var contents, data, _a, _b;
|
|
483
|
+
return __generator(this, function (_c) {
|
|
484
|
+
switch (_c.label) {
|
|
485
|
+
case 0:
|
|
486
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
487
|
+
return [2, deserializeAws_restJson1ListLexiconsCommandError(output, context)];
|
|
488
|
+
}
|
|
489
|
+
contents = map({
|
|
490
|
+
$metadata: deserializeMetadata(output),
|
|
491
|
+
});
|
|
492
|
+
_a = __expectNonNull;
|
|
493
|
+
_b = __expectObject;
|
|
494
|
+
return [4, parseBody(output.body, context)];
|
|
495
|
+
case 1:
|
|
496
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
497
|
+
if (data.Lexicons != null) {
|
|
498
|
+
contents.Lexicons = deserializeAws_restJson1LexiconDescriptionList(data.Lexicons, context);
|
|
499
|
+
}
|
|
500
|
+
if (data.NextToken != null) {
|
|
501
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
502
|
+
}
|
|
503
|
+
return [2, contents];
|
|
504
|
+
}
|
|
284
505
|
});
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
};
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
parsedBody
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
const contents = map({
|
|
322
|
-
$metadata: deserializeMetadata(output),
|
|
506
|
+
}); };
|
|
507
|
+
var deserializeAws_restJson1ListLexiconsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
508
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
509
|
+
var _c;
|
|
510
|
+
return __generator(this, function (_d) {
|
|
511
|
+
switch (_d.label) {
|
|
512
|
+
case 0:
|
|
513
|
+
_a = [__assign({}, output)];
|
|
514
|
+
_c = {};
|
|
515
|
+
return [4, parseErrorBody(output.body, context)];
|
|
516
|
+
case 1:
|
|
517
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
518
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
519
|
+
_b = errorCode;
|
|
520
|
+
switch (_b) {
|
|
521
|
+
case "InvalidNextTokenException": return [3, 2];
|
|
522
|
+
case "com.amazonaws.polly#InvalidNextTokenException": return [3, 2];
|
|
523
|
+
case "ServiceFailureException": return [3, 4];
|
|
524
|
+
case "com.amazonaws.polly#ServiceFailureException": return [3, 4];
|
|
525
|
+
}
|
|
526
|
+
return [3, 6];
|
|
527
|
+
case 2: return [4, deserializeAws_restJson1InvalidNextTokenExceptionResponse(parsedOutput, context)];
|
|
528
|
+
case 3: throw _d.sent();
|
|
529
|
+
case 4: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
|
|
530
|
+
case 5: throw _d.sent();
|
|
531
|
+
case 6:
|
|
532
|
+
parsedBody = parsedOutput.body;
|
|
533
|
+
throwDefaultError({
|
|
534
|
+
output: output,
|
|
535
|
+
parsedBody: parsedBody,
|
|
536
|
+
exceptionCtor: __BaseException,
|
|
537
|
+
errorCode: errorCode,
|
|
538
|
+
});
|
|
539
|
+
_d.label = 7;
|
|
540
|
+
case 7: return [2];
|
|
541
|
+
}
|
|
323
542
|
});
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
output,
|
|
350
|
-
parsedBody,
|
|
351
|
-
exceptionCtor: __BaseException,
|
|
352
|
-
errorCode,
|
|
353
|
-
});
|
|
354
|
-
}
|
|
355
|
-
};
|
|
356
|
-
export const deserializeAws_restJson1ListLexiconsCommand = async (output, context) => {
|
|
357
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
358
|
-
return deserializeAws_restJson1ListLexiconsCommandError(output, context);
|
|
359
|
-
}
|
|
360
|
-
const contents = map({
|
|
361
|
-
$metadata: deserializeMetadata(output),
|
|
543
|
+
}); };
|
|
544
|
+
export var deserializeAws_restJson1ListSpeechSynthesisTasksCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
545
|
+
var contents, data, _a, _b;
|
|
546
|
+
return __generator(this, function (_c) {
|
|
547
|
+
switch (_c.label) {
|
|
548
|
+
case 0:
|
|
549
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
550
|
+
return [2, deserializeAws_restJson1ListSpeechSynthesisTasksCommandError(output, context)];
|
|
551
|
+
}
|
|
552
|
+
contents = map({
|
|
553
|
+
$metadata: deserializeMetadata(output),
|
|
554
|
+
});
|
|
555
|
+
_a = __expectNonNull;
|
|
556
|
+
_b = __expectObject;
|
|
557
|
+
return [4, parseBody(output.body, context)];
|
|
558
|
+
case 1:
|
|
559
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
560
|
+
if (data.NextToken != null) {
|
|
561
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
562
|
+
}
|
|
563
|
+
if (data.SynthesisTasks != null) {
|
|
564
|
+
contents.SynthesisTasks = deserializeAws_restJson1SynthesisTasks(data.SynthesisTasks, context);
|
|
565
|
+
}
|
|
566
|
+
return [2, contents];
|
|
567
|
+
}
|
|
362
568
|
});
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
};
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
parsedBody
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
const contents = map({
|
|
400
|
-
$metadata: deserializeMetadata(output),
|
|
569
|
+
}); };
|
|
570
|
+
var deserializeAws_restJson1ListSpeechSynthesisTasksCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
571
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
572
|
+
var _c;
|
|
573
|
+
return __generator(this, function (_d) {
|
|
574
|
+
switch (_d.label) {
|
|
575
|
+
case 0:
|
|
576
|
+
_a = [__assign({}, output)];
|
|
577
|
+
_c = {};
|
|
578
|
+
return [4, parseErrorBody(output.body, context)];
|
|
579
|
+
case 1:
|
|
580
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
581
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
582
|
+
_b = errorCode;
|
|
583
|
+
switch (_b) {
|
|
584
|
+
case "InvalidNextTokenException": return [3, 2];
|
|
585
|
+
case "com.amazonaws.polly#InvalidNextTokenException": return [3, 2];
|
|
586
|
+
case "ServiceFailureException": return [3, 4];
|
|
587
|
+
case "com.amazonaws.polly#ServiceFailureException": return [3, 4];
|
|
588
|
+
}
|
|
589
|
+
return [3, 6];
|
|
590
|
+
case 2: return [4, deserializeAws_restJson1InvalidNextTokenExceptionResponse(parsedOutput, context)];
|
|
591
|
+
case 3: throw _d.sent();
|
|
592
|
+
case 4: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
|
|
593
|
+
case 5: throw _d.sent();
|
|
594
|
+
case 6:
|
|
595
|
+
parsedBody = parsedOutput.body;
|
|
596
|
+
throwDefaultError({
|
|
597
|
+
output: output,
|
|
598
|
+
parsedBody: parsedBody,
|
|
599
|
+
exceptionCtor: __BaseException,
|
|
600
|
+
errorCode: errorCode,
|
|
601
|
+
});
|
|
602
|
+
_d.label = 7;
|
|
603
|
+
case 7: return [2];
|
|
604
|
+
}
|
|
401
605
|
});
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
case "com.amazonaws.polly#InvalidNextTokenException":
|
|
420
|
-
throw await deserializeAws_restJson1InvalidNextTokenExceptionResponse(parsedOutput, context);
|
|
421
|
-
case "ServiceFailureException":
|
|
422
|
-
case "com.amazonaws.polly#ServiceFailureException":
|
|
423
|
-
throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
|
|
424
|
-
default:
|
|
425
|
-
const parsedBody = parsedOutput.body;
|
|
426
|
-
throwDefaultError({
|
|
427
|
-
output,
|
|
428
|
-
parsedBody,
|
|
429
|
-
exceptionCtor: __BaseException,
|
|
430
|
-
errorCode,
|
|
431
|
-
});
|
|
432
|
-
}
|
|
433
|
-
};
|
|
434
|
-
export const deserializeAws_restJson1PutLexiconCommand = async (output, context) => {
|
|
435
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
436
|
-
return deserializeAws_restJson1PutLexiconCommandError(output, context);
|
|
437
|
-
}
|
|
438
|
-
const contents = map({
|
|
439
|
-
$metadata: deserializeMetadata(output),
|
|
606
|
+
}); };
|
|
607
|
+
export var deserializeAws_restJson1PutLexiconCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
608
|
+
var contents;
|
|
609
|
+
return __generator(this, function (_a) {
|
|
610
|
+
switch (_a.label) {
|
|
611
|
+
case 0:
|
|
612
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
613
|
+
return [2, deserializeAws_restJson1PutLexiconCommandError(output, context)];
|
|
614
|
+
}
|
|
615
|
+
contents = map({
|
|
616
|
+
$metadata: deserializeMetadata(output),
|
|
617
|
+
});
|
|
618
|
+
return [4, collectBody(output.body, context)];
|
|
619
|
+
case 1:
|
|
620
|
+
_a.sent();
|
|
621
|
+
return [2, contents];
|
|
622
|
+
}
|
|
440
623
|
});
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
624
|
+
}); };
|
|
625
|
+
var deserializeAws_restJson1PutLexiconCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
626
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
627
|
+
var _c;
|
|
628
|
+
return __generator(this, function (_d) {
|
|
629
|
+
switch (_d.label) {
|
|
630
|
+
case 0:
|
|
631
|
+
_a = [__assign({}, output)];
|
|
632
|
+
_c = {};
|
|
633
|
+
return [4, parseErrorBody(output.body, context)];
|
|
634
|
+
case 1:
|
|
635
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
636
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
637
|
+
_b = errorCode;
|
|
638
|
+
switch (_b) {
|
|
639
|
+
case "InvalidLexiconException": return [3, 2];
|
|
640
|
+
case "com.amazonaws.polly#InvalidLexiconException": return [3, 2];
|
|
641
|
+
case "LexiconSizeExceededException": return [3, 4];
|
|
642
|
+
case "com.amazonaws.polly#LexiconSizeExceededException": return [3, 4];
|
|
643
|
+
case "MaxLexemeLengthExceededException": return [3, 6];
|
|
644
|
+
case "com.amazonaws.polly#MaxLexemeLengthExceededException": return [3, 6];
|
|
645
|
+
case "MaxLexiconsNumberExceededException": return [3, 8];
|
|
646
|
+
case "com.amazonaws.polly#MaxLexiconsNumberExceededException": return [3, 8];
|
|
647
|
+
case "ServiceFailureException": return [3, 10];
|
|
648
|
+
case "com.amazonaws.polly#ServiceFailureException": return [3, 10];
|
|
649
|
+
case "UnsupportedPlsAlphabetException": return [3, 12];
|
|
650
|
+
case "com.amazonaws.polly#UnsupportedPlsAlphabetException": return [3, 12];
|
|
651
|
+
case "UnsupportedPlsLanguageException": return [3, 14];
|
|
652
|
+
case "com.amazonaws.polly#UnsupportedPlsLanguageException": return [3, 14];
|
|
653
|
+
}
|
|
654
|
+
return [3, 16];
|
|
655
|
+
case 2: return [4, deserializeAws_restJson1InvalidLexiconExceptionResponse(parsedOutput, context)];
|
|
656
|
+
case 3: throw _d.sent();
|
|
657
|
+
case 4: return [4, deserializeAws_restJson1LexiconSizeExceededExceptionResponse(parsedOutput, context)];
|
|
658
|
+
case 5: throw _d.sent();
|
|
659
|
+
case 6: return [4, deserializeAws_restJson1MaxLexemeLengthExceededExceptionResponse(parsedOutput, context)];
|
|
660
|
+
case 7: throw _d.sent();
|
|
661
|
+
case 8: return [4, deserializeAws_restJson1MaxLexiconsNumberExceededExceptionResponse(parsedOutput, context)];
|
|
662
|
+
case 9: throw _d.sent();
|
|
663
|
+
case 10: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
|
|
664
|
+
case 11: throw _d.sent();
|
|
665
|
+
case 12: return [4, deserializeAws_restJson1UnsupportedPlsAlphabetExceptionResponse(parsedOutput, context)];
|
|
666
|
+
case 13: throw _d.sent();
|
|
667
|
+
case 14: return [4, deserializeAws_restJson1UnsupportedPlsLanguageExceptionResponse(parsedOutput, context)];
|
|
668
|
+
case 15: throw _d.sent();
|
|
669
|
+
case 16:
|
|
670
|
+
parsedBody = parsedOutput.body;
|
|
671
|
+
throwDefaultError({
|
|
672
|
+
output: output,
|
|
673
|
+
parsedBody: parsedBody,
|
|
674
|
+
exceptionCtor: __BaseException,
|
|
675
|
+
errorCode: errorCode,
|
|
676
|
+
});
|
|
677
|
+
_d.label = 17;
|
|
678
|
+
case 17: return [2];
|
|
679
|
+
}
|
|
488
680
|
});
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
case "InvalidSampleRateException":
|
|
512
|
-
case "com.amazonaws.polly#InvalidSampleRateException":
|
|
513
|
-
throw await deserializeAws_restJson1InvalidSampleRateExceptionResponse(parsedOutput, context);
|
|
514
|
-
case "InvalidSnsTopicArnException":
|
|
515
|
-
case "com.amazonaws.polly#InvalidSnsTopicArnException":
|
|
516
|
-
throw await deserializeAws_restJson1InvalidSnsTopicArnExceptionResponse(parsedOutput, context);
|
|
517
|
-
case "InvalidSsmlException":
|
|
518
|
-
case "com.amazonaws.polly#InvalidSsmlException":
|
|
519
|
-
throw await deserializeAws_restJson1InvalidSsmlExceptionResponse(parsedOutput, context);
|
|
520
|
-
case "LanguageNotSupportedException":
|
|
521
|
-
case "com.amazonaws.polly#LanguageNotSupportedException":
|
|
522
|
-
throw await deserializeAws_restJson1LanguageNotSupportedExceptionResponse(parsedOutput, context);
|
|
523
|
-
case "LexiconNotFoundException":
|
|
524
|
-
case "com.amazonaws.polly#LexiconNotFoundException":
|
|
525
|
-
throw await deserializeAws_restJson1LexiconNotFoundExceptionResponse(parsedOutput, context);
|
|
526
|
-
case "MarksNotSupportedForFormatException":
|
|
527
|
-
case "com.amazonaws.polly#MarksNotSupportedForFormatException":
|
|
528
|
-
throw await deserializeAws_restJson1MarksNotSupportedForFormatExceptionResponse(parsedOutput, context);
|
|
529
|
-
case "ServiceFailureException":
|
|
530
|
-
case "com.amazonaws.polly#ServiceFailureException":
|
|
531
|
-
throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
|
|
532
|
-
case "SsmlMarksNotSupportedForTextTypeException":
|
|
533
|
-
case "com.amazonaws.polly#SsmlMarksNotSupportedForTextTypeException":
|
|
534
|
-
throw await deserializeAws_restJson1SsmlMarksNotSupportedForTextTypeExceptionResponse(parsedOutput, context);
|
|
535
|
-
case "TextLengthExceededException":
|
|
536
|
-
case "com.amazonaws.polly#TextLengthExceededException":
|
|
537
|
-
throw await deserializeAws_restJson1TextLengthExceededExceptionResponse(parsedOutput, context);
|
|
538
|
-
default:
|
|
539
|
-
const parsedBody = parsedOutput.body;
|
|
540
|
-
throwDefaultError({
|
|
541
|
-
output,
|
|
542
|
-
parsedBody,
|
|
543
|
-
exceptionCtor: __BaseException,
|
|
544
|
-
errorCode,
|
|
545
|
-
});
|
|
546
|
-
}
|
|
547
|
-
};
|
|
548
|
-
export const deserializeAws_restJson1SynthesizeSpeechCommand = async (output, context) => {
|
|
549
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
550
|
-
return deserializeAws_restJson1SynthesizeSpeechCommandError(output, context);
|
|
551
|
-
}
|
|
552
|
-
const contents = map({
|
|
553
|
-
$metadata: deserializeMetadata(output),
|
|
554
|
-
ContentType: [, output.headers["content-type"]],
|
|
555
|
-
RequestCharacters: [
|
|
556
|
-
() => void 0 !== output.headers["x-amzn-requestcharacters"],
|
|
557
|
-
() => __strictParseInt32(output.headers["x-amzn-requestcharacters"]),
|
|
558
|
-
],
|
|
681
|
+
}); };
|
|
682
|
+
export var deserializeAws_restJson1StartSpeechSynthesisTaskCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
683
|
+
var contents, data, _a, _b;
|
|
684
|
+
return __generator(this, function (_c) {
|
|
685
|
+
switch (_c.label) {
|
|
686
|
+
case 0:
|
|
687
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
688
|
+
return [2, deserializeAws_restJson1StartSpeechSynthesisTaskCommandError(output, context)];
|
|
689
|
+
}
|
|
690
|
+
contents = map({
|
|
691
|
+
$metadata: deserializeMetadata(output),
|
|
692
|
+
});
|
|
693
|
+
_a = __expectNonNull;
|
|
694
|
+
_b = __expectObject;
|
|
695
|
+
return [4, parseBody(output.body, context)];
|
|
696
|
+
case 1:
|
|
697
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
698
|
+
if (data.SynthesisTask != null) {
|
|
699
|
+
contents.SynthesisTask = deserializeAws_restJson1SynthesisTask(data.SynthesisTask, context);
|
|
700
|
+
}
|
|
701
|
+
return [2, contents];
|
|
702
|
+
}
|
|
559
703
|
});
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
704
|
+
}); };
|
|
705
|
+
var deserializeAws_restJson1StartSpeechSynthesisTaskCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
706
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
707
|
+
var _c;
|
|
708
|
+
return __generator(this, function (_d) {
|
|
709
|
+
switch (_d.label) {
|
|
710
|
+
case 0:
|
|
711
|
+
_a = [__assign({}, output)];
|
|
712
|
+
_c = {};
|
|
713
|
+
return [4, parseErrorBody(output.body, context)];
|
|
714
|
+
case 1:
|
|
715
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
716
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
717
|
+
_b = errorCode;
|
|
718
|
+
switch (_b) {
|
|
719
|
+
case "EngineNotSupportedException": return [3, 2];
|
|
720
|
+
case "com.amazonaws.polly#EngineNotSupportedException": return [3, 2];
|
|
721
|
+
case "InvalidS3BucketException": return [3, 4];
|
|
722
|
+
case "com.amazonaws.polly#InvalidS3BucketException": return [3, 4];
|
|
723
|
+
case "InvalidS3KeyException": return [3, 6];
|
|
724
|
+
case "com.amazonaws.polly#InvalidS3KeyException": return [3, 6];
|
|
725
|
+
case "InvalidSampleRateException": return [3, 8];
|
|
726
|
+
case "com.amazonaws.polly#InvalidSampleRateException": return [3, 8];
|
|
727
|
+
case "InvalidSnsTopicArnException": return [3, 10];
|
|
728
|
+
case "com.amazonaws.polly#InvalidSnsTopicArnException": return [3, 10];
|
|
729
|
+
case "InvalidSsmlException": return [3, 12];
|
|
730
|
+
case "com.amazonaws.polly#InvalidSsmlException": return [3, 12];
|
|
731
|
+
case "LanguageNotSupportedException": return [3, 14];
|
|
732
|
+
case "com.amazonaws.polly#LanguageNotSupportedException": return [3, 14];
|
|
733
|
+
case "LexiconNotFoundException": return [3, 16];
|
|
734
|
+
case "com.amazonaws.polly#LexiconNotFoundException": return [3, 16];
|
|
735
|
+
case "MarksNotSupportedForFormatException": return [3, 18];
|
|
736
|
+
case "com.amazonaws.polly#MarksNotSupportedForFormatException": return [3, 18];
|
|
737
|
+
case "ServiceFailureException": return [3, 20];
|
|
738
|
+
case "com.amazonaws.polly#ServiceFailureException": return [3, 20];
|
|
739
|
+
case "SsmlMarksNotSupportedForTextTypeException": return [3, 22];
|
|
740
|
+
case "com.amazonaws.polly#SsmlMarksNotSupportedForTextTypeException": return [3, 22];
|
|
741
|
+
case "TextLengthExceededException": return [3, 24];
|
|
742
|
+
case "com.amazonaws.polly#TextLengthExceededException": return [3, 24];
|
|
743
|
+
}
|
|
744
|
+
return [3, 26];
|
|
745
|
+
case 2: return [4, deserializeAws_restJson1EngineNotSupportedExceptionResponse(parsedOutput, context)];
|
|
746
|
+
case 3: throw _d.sent();
|
|
747
|
+
case 4: return [4, deserializeAws_restJson1InvalidS3BucketExceptionResponse(parsedOutput, context)];
|
|
748
|
+
case 5: throw _d.sent();
|
|
749
|
+
case 6: return [4, deserializeAws_restJson1InvalidS3KeyExceptionResponse(parsedOutput, context)];
|
|
750
|
+
case 7: throw _d.sent();
|
|
751
|
+
case 8: return [4, deserializeAws_restJson1InvalidSampleRateExceptionResponse(parsedOutput, context)];
|
|
752
|
+
case 9: throw _d.sent();
|
|
753
|
+
case 10: return [4, deserializeAws_restJson1InvalidSnsTopicArnExceptionResponse(parsedOutput, context)];
|
|
754
|
+
case 11: throw _d.sent();
|
|
755
|
+
case 12: return [4, deserializeAws_restJson1InvalidSsmlExceptionResponse(parsedOutput, context)];
|
|
756
|
+
case 13: throw _d.sent();
|
|
757
|
+
case 14: return [4, deserializeAws_restJson1LanguageNotSupportedExceptionResponse(parsedOutput, context)];
|
|
758
|
+
case 15: throw _d.sent();
|
|
759
|
+
case 16: return [4, deserializeAws_restJson1LexiconNotFoundExceptionResponse(parsedOutput, context)];
|
|
760
|
+
case 17: throw _d.sent();
|
|
761
|
+
case 18: return [4, deserializeAws_restJson1MarksNotSupportedForFormatExceptionResponse(parsedOutput, context)];
|
|
762
|
+
case 19: throw _d.sent();
|
|
763
|
+
case 20: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
|
|
764
|
+
case 21: throw _d.sent();
|
|
765
|
+
case 22: return [4, deserializeAws_restJson1SsmlMarksNotSupportedForTextTypeExceptionResponse(parsedOutput, context)];
|
|
766
|
+
case 23: throw _d.sent();
|
|
767
|
+
case 24: return [4, deserializeAws_restJson1TextLengthExceededExceptionResponse(parsedOutput, context)];
|
|
768
|
+
case 25: throw _d.sent();
|
|
769
|
+
case 26:
|
|
770
|
+
parsedBody = parsedOutput.body;
|
|
771
|
+
throwDefaultError({
|
|
772
|
+
output: output,
|
|
773
|
+
parsedBody: parsedBody,
|
|
774
|
+
exceptionCtor: __BaseException,
|
|
775
|
+
errorCode: errorCode,
|
|
776
|
+
});
|
|
777
|
+
_d.label = 27;
|
|
778
|
+
case 27: return [2];
|
|
779
|
+
}
|
|
618
780
|
});
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
781
|
+
}); };
|
|
782
|
+
export var deserializeAws_restJson1SynthesizeSpeechCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
783
|
+
var contents, data;
|
|
784
|
+
return __generator(this, function (_a) {
|
|
785
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
786
|
+
return [2, deserializeAws_restJson1SynthesizeSpeechCommandError(output, context)];
|
|
787
|
+
}
|
|
788
|
+
contents = map({
|
|
789
|
+
$metadata: deserializeMetadata(output),
|
|
790
|
+
ContentType: [, output.headers["content-type"]],
|
|
791
|
+
RequestCharacters: [
|
|
792
|
+
function () { return void 0 !== output.headers["x-amzn-requestcharacters"]; },
|
|
793
|
+
function () { return __strictParseInt32(output.headers["x-amzn-requestcharacters"]); },
|
|
794
|
+
],
|
|
795
|
+
});
|
|
796
|
+
data = output.body;
|
|
797
|
+
contents.AudioStream = data;
|
|
798
|
+
return [2, contents];
|
|
630
799
|
});
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
800
|
+
}); };
|
|
801
|
+
var deserializeAws_restJson1SynthesizeSpeechCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
802
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
803
|
+
var _c;
|
|
804
|
+
return __generator(this, function (_d) {
|
|
805
|
+
switch (_d.label) {
|
|
806
|
+
case 0:
|
|
807
|
+
_a = [__assign({}, output)];
|
|
808
|
+
_c = {};
|
|
809
|
+
return [4, parseErrorBody(output.body, context)];
|
|
810
|
+
case 1:
|
|
811
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
812
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
813
|
+
_b = errorCode;
|
|
814
|
+
switch (_b) {
|
|
815
|
+
case "EngineNotSupportedException": return [3, 2];
|
|
816
|
+
case "com.amazonaws.polly#EngineNotSupportedException": return [3, 2];
|
|
817
|
+
case "InvalidSampleRateException": return [3, 4];
|
|
818
|
+
case "com.amazonaws.polly#InvalidSampleRateException": return [3, 4];
|
|
819
|
+
case "InvalidSsmlException": return [3, 6];
|
|
820
|
+
case "com.amazonaws.polly#InvalidSsmlException": return [3, 6];
|
|
821
|
+
case "LanguageNotSupportedException": return [3, 8];
|
|
822
|
+
case "com.amazonaws.polly#LanguageNotSupportedException": return [3, 8];
|
|
823
|
+
case "LexiconNotFoundException": return [3, 10];
|
|
824
|
+
case "com.amazonaws.polly#LexiconNotFoundException": return [3, 10];
|
|
825
|
+
case "MarksNotSupportedForFormatException": return [3, 12];
|
|
826
|
+
case "com.amazonaws.polly#MarksNotSupportedForFormatException": return [3, 12];
|
|
827
|
+
case "ServiceFailureException": return [3, 14];
|
|
828
|
+
case "com.amazonaws.polly#ServiceFailureException": return [3, 14];
|
|
829
|
+
case "SsmlMarksNotSupportedForTextTypeException": return [3, 16];
|
|
830
|
+
case "com.amazonaws.polly#SsmlMarksNotSupportedForTextTypeException": return [3, 16];
|
|
831
|
+
case "TextLengthExceededException": return [3, 18];
|
|
832
|
+
case "com.amazonaws.polly#TextLengthExceededException": return [3, 18];
|
|
833
|
+
}
|
|
834
|
+
return [3, 20];
|
|
835
|
+
case 2: return [4, deserializeAws_restJson1EngineNotSupportedExceptionResponse(parsedOutput, context)];
|
|
836
|
+
case 3: throw _d.sent();
|
|
837
|
+
case 4: return [4, deserializeAws_restJson1InvalidSampleRateExceptionResponse(parsedOutput, context)];
|
|
838
|
+
case 5: throw _d.sent();
|
|
839
|
+
case 6: return [4, deserializeAws_restJson1InvalidSsmlExceptionResponse(parsedOutput, context)];
|
|
840
|
+
case 7: throw _d.sent();
|
|
841
|
+
case 8: return [4, deserializeAws_restJson1LanguageNotSupportedExceptionResponse(parsedOutput, context)];
|
|
842
|
+
case 9: throw _d.sent();
|
|
843
|
+
case 10: return [4, deserializeAws_restJson1LexiconNotFoundExceptionResponse(parsedOutput, context)];
|
|
844
|
+
case 11: throw _d.sent();
|
|
845
|
+
case 12: return [4, deserializeAws_restJson1MarksNotSupportedForFormatExceptionResponse(parsedOutput, context)];
|
|
846
|
+
case 13: throw _d.sent();
|
|
847
|
+
case 14: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
|
|
848
|
+
case 15: throw _d.sent();
|
|
849
|
+
case 16: return [4, deserializeAws_restJson1SsmlMarksNotSupportedForTextTypeExceptionResponse(parsedOutput, context)];
|
|
850
|
+
case 17: throw _d.sent();
|
|
851
|
+
case 18: return [4, deserializeAws_restJson1TextLengthExceededExceptionResponse(parsedOutput, context)];
|
|
852
|
+
case 19: throw _d.sent();
|
|
853
|
+
case 20:
|
|
854
|
+
parsedBody = parsedOutput.body;
|
|
855
|
+
throwDefaultError({
|
|
856
|
+
output: output,
|
|
857
|
+
parsedBody: parsedBody,
|
|
858
|
+
exceptionCtor: __BaseException,
|
|
859
|
+
errorCode: errorCode,
|
|
860
|
+
});
|
|
861
|
+
_d.label = 21;
|
|
862
|
+
case 21: return [2];
|
|
863
|
+
}
|
|
642
864
|
});
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
865
|
+
}); };
|
|
866
|
+
var map = __map;
|
|
867
|
+
var deserializeAws_restJson1EngineNotSupportedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
868
|
+
var contents, data, exception;
|
|
869
|
+
return __generator(this, function (_a) {
|
|
870
|
+
contents = map({});
|
|
871
|
+
data = parsedOutput.body;
|
|
872
|
+
if (data.message != null) {
|
|
873
|
+
contents.message = __expectString(data.message);
|
|
874
|
+
}
|
|
875
|
+
exception = new EngineNotSupportedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
876
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
654
877
|
});
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
665
|
-
|
|
878
|
+
}); };
|
|
879
|
+
var deserializeAws_restJson1InvalidLexiconExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
880
|
+
var contents, data, exception;
|
|
881
|
+
return __generator(this, function (_a) {
|
|
882
|
+
contents = map({});
|
|
883
|
+
data = parsedOutput.body;
|
|
884
|
+
if (data.message != null) {
|
|
885
|
+
contents.message = __expectString(data.message);
|
|
886
|
+
}
|
|
887
|
+
exception = new InvalidLexiconException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
888
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
666
889
|
});
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
677
|
-
|
|
890
|
+
}); };
|
|
891
|
+
var deserializeAws_restJson1InvalidNextTokenExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
892
|
+
var contents, data, exception;
|
|
893
|
+
return __generator(this, function (_a) {
|
|
894
|
+
contents = map({});
|
|
895
|
+
data = parsedOutput.body;
|
|
896
|
+
if (data.message != null) {
|
|
897
|
+
contents.message = __expectString(data.message);
|
|
898
|
+
}
|
|
899
|
+
exception = new InvalidNextTokenException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
900
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
678
901
|
});
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
689
|
-
|
|
902
|
+
}); };
|
|
903
|
+
var deserializeAws_restJson1InvalidS3BucketExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
904
|
+
var contents, data, exception;
|
|
905
|
+
return __generator(this, function (_a) {
|
|
906
|
+
contents = map({});
|
|
907
|
+
data = parsedOutput.body;
|
|
908
|
+
if (data.message != null) {
|
|
909
|
+
contents.message = __expectString(data.message);
|
|
910
|
+
}
|
|
911
|
+
exception = new InvalidS3BucketException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
912
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
690
913
|
});
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
701
|
-
|
|
914
|
+
}); };
|
|
915
|
+
var deserializeAws_restJson1InvalidS3KeyExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
916
|
+
var contents, data, exception;
|
|
917
|
+
return __generator(this, function (_a) {
|
|
918
|
+
contents = map({});
|
|
919
|
+
data = parsedOutput.body;
|
|
920
|
+
if (data.message != null) {
|
|
921
|
+
contents.message = __expectString(data.message);
|
|
922
|
+
}
|
|
923
|
+
exception = new InvalidS3KeyException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
924
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
702
925
|
});
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
713
|
-
|
|
926
|
+
}); };
|
|
927
|
+
var deserializeAws_restJson1InvalidSampleRateExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
928
|
+
var contents, data, exception;
|
|
929
|
+
return __generator(this, function (_a) {
|
|
930
|
+
contents = map({});
|
|
931
|
+
data = parsedOutput.body;
|
|
932
|
+
if (data.message != null) {
|
|
933
|
+
contents.message = __expectString(data.message);
|
|
934
|
+
}
|
|
935
|
+
exception = new InvalidSampleRateException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
936
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
714
937
|
});
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
725
|
-
|
|
938
|
+
}); };
|
|
939
|
+
var deserializeAws_restJson1InvalidSnsTopicArnExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
940
|
+
var contents, data, exception;
|
|
941
|
+
return __generator(this, function (_a) {
|
|
942
|
+
contents = map({});
|
|
943
|
+
data = parsedOutput.body;
|
|
944
|
+
if (data.message != null) {
|
|
945
|
+
contents.message = __expectString(data.message);
|
|
946
|
+
}
|
|
947
|
+
exception = new InvalidSnsTopicArnException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
948
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
726
949
|
});
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
737
|
-
|
|
950
|
+
}); };
|
|
951
|
+
var deserializeAws_restJson1InvalidSsmlExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
952
|
+
var contents, data, exception;
|
|
953
|
+
return __generator(this, function (_a) {
|
|
954
|
+
contents = map({});
|
|
955
|
+
data = parsedOutput.body;
|
|
956
|
+
if (data.message != null) {
|
|
957
|
+
contents.message = __expectString(data.message);
|
|
958
|
+
}
|
|
959
|
+
exception = new InvalidSsmlException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
960
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
738
961
|
});
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
749
|
-
|
|
962
|
+
}); };
|
|
963
|
+
var deserializeAws_restJson1InvalidTaskIdExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
964
|
+
var contents, data, exception;
|
|
965
|
+
return __generator(this, function (_a) {
|
|
966
|
+
contents = map({});
|
|
967
|
+
data = parsedOutput.body;
|
|
968
|
+
if (data.message != null) {
|
|
969
|
+
contents.message = __expectString(data.message);
|
|
970
|
+
}
|
|
971
|
+
exception = new InvalidTaskIdException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
972
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
750
973
|
});
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
761
|
-
|
|
974
|
+
}); };
|
|
975
|
+
var deserializeAws_restJson1LanguageNotSupportedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
976
|
+
var contents, data, exception;
|
|
977
|
+
return __generator(this, function (_a) {
|
|
978
|
+
contents = map({});
|
|
979
|
+
data = parsedOutput.body;
|
|
980
|
+
if (data.message != null) {
|
|
981
|
+
contents.message = __expectString(data.message);
|
|
982
|
+
}
|
|
983
|
+
exception = new LanguageNotSupportedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
984
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
762
985
|
});
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
773
|
-
|
|
986
|
+
}); };
|
|
987
|
+
var deserializeAws_restJson1LexiconNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
988
|
+
var contents, data, exception;
|
|
989
|
+
return __generator(this, function (_a) {
|
|
990
|
+
contents = map({});
|
|
991
|
+
data = parsedOutput.body;
|
|
992
|
+
if (data.message != null) {
|
|
993
|
+
contents.message = __expectString(data.message);
|
|
994
|
+
}
|
|
995
|
+
exception = new LexiconNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
996
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
774
997
|
});
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
785
|
-
|
|
998
|
+
}); };
|
|
999
|
+
var deserializeAws_restJson1LexiconSizeExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1000
|
+
var contents, data, exception;
|
|
1001
|
+
return __generator(this, function (_a) {
|
|
1002
|
+
contents = map({});
|
|
1003
|
+
data = parsedOutput.body;
|
|
1004
|
+
if (data.message != null) {
|
|
1005
|
+
contents.message = __expectString(data.message);
|
|
1006
|
+
}
|
|
1007
|
+
exception = new LexiconSizeExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1008
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
786
1009
|
});
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
797
|
-
|
|
1010
|
+
}); };
|
|
1011
|
+
var deserializeAws_restJson1MarksNotSupportedForFormatExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1012
|
+
var contents, data, exception;
|
|
1013
|
+
return __generator(this, function (_a) {
|
|
1014
|
+
contents = map({});
|
|
1015
|
+
data = parsedOutput.body;
|
|
1016
|
+
if (data.message != null) {
|
|
1017
|
+
contents.message = __expectString(data.message);
|
|
1018
|
+
}
|
|
1019
|
+
exception = new MarksNotSupportedForFormatException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1020
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
798
1021
|
});
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
809
|
-
|
|
1022
|
+
}); };
|
|
1023
|
+
var deserializeAws_restJson1MaxLexemeLengthExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1024
|
+
var contents, data, exception;
|
|
1025
|
+
return __generator(this, function (_a) {
|
|
1026
|
+
contents = map({});
|
|
1027
|
+
data = parsedOutput.body;
|
|
1028
|
+
if (data.message != null) {
|
|
1029
|
+
contents.message = __expectString(data.message);
|
|
1030
|
+
}
|
|
1031
|
+
exception = new MaxLexemeLengthExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1032
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
810
1033
|
});
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
821
|
-
|
|
1034
|
+
}); };
|
|
1035
|
+
var deserializeAws_restJson1MaxLexiconsNumberExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1036
|
+
var contents, data, exception;
|
|
1037
|
+
return __generator(this, function (_a) {
|
|
1038
|
+
contents = map({});
|
|
1039
|
+
data = parsedOutput.body;
|
|
1040
|
+
if (data.message != null) {
|
|
1041
|
+
contents.message = __expectString(data.message);
|
|
1042
|
+
}
|
|
1043
|
+
exception = new MaxLexiconsNumberExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1044
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
822
1045
|
});
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
833
|
-
|
|
1046
|
+
}); };
|
|
1047
|
+
var deserializeAws_restJson1ServiceFailureExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1048
|
+
var contents, data, exception;
|
|
1049
|
+
return __generator(this, function (_a) {
|
|
1050
|
+
contents = map({});
|
|
1051
|
+
data = parsedOutput.body;
|
|
1052
|
+
if (data.message != null) {
|
|
1053
|
+
contents.message = __expectString(data.message);
|
|
1054
|
+
}
|
|
1055
|
+
exception = new ServiceFailureException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1056
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
834
1057
|
});
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
845
|
-
|
|
1058
|
+
}); };
|
|
1059
|
+
var deserializeAws_restJson1SsmlMarksNotSupportedForTextTypeExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1060
|
+
var contents, data, exception;
|
|
1061
|
+
return __generator(this, function (_a) {
|
|
1062
|
+
contents = map({});
|
|
1063
|
+
data = parsedOutput.body;
|
|
1064
|
+
if (data.message != null) {
|
|
1065
|
+
contents.message = __expectString(data.message);
|
|
1066
|
+
}
|
|
1067
|
+
exception = new SsmlMarksNotSupportedForTextTypeException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1068
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
846
1069
|
});
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
857
|
-
|
|
1070
|
+
}); };
|
|
1071
|
+
var deserializeAws_restJson1SynthesisTaskNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1072
|
+
var contents, data, exception;
|
|
1073
|
+
return __generator(this, function (_a) {
|
|
1074
|
+
contents = map({});
|
|
1075
|
+
data = parsedOutput.body;
|
|
1076
|
+
if (data.message != null) {
|
|
1077
|
+
contents.message = __expectString(data.message);
|
|
1078
|
+
}
|
|
1079
|
+
exception = new SynthesisTaskNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1080
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
858
1081
|
});
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
1082
|
+
}); };
|
|
1083
|
+
var deserializeAws_restJson1TextLengthExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1084
|
+
var contents, data, exception;
|
|
1085
|
+
return __generator(this, function (_a) {
|
|
1086
|
+
contents = map({});
|
|
1087
|
+
data = parsedOutput.body;
|
|
1088
|
+
if (data.message != null) {
|
|
1089
|
+
contents.message = __expectString(data.message);
|
|
1090
|
+
}
|
|
1091
|
+
exception = new TextLengthExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1092
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1093
|
+
});
|
|
1094
|
+
}); };
|
|
1095
|
+
var deserializeAws_restJson1UnsupportedPlsAlphabetExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1096
|
+
var contents, data, exception;
|
|
1097
|
+
return __generator(this, function (_a) {
|
|
1098
|
+
contents = map({});
|
|
1099
|
+
data = parsedOutput.body;
|
|
1100
|
+
if (data.message != null) {
|
|
1101
|
+
contents.message = __expectString(data.message);
|
|
1102
|
+
}
|
|
1103
|
+
exception = new UnsupportedPlsAlphabetException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1104
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1105
|
+
});
|
|
1106
|
+
}); };
|
|
1107
|
+
var deserializeAws_restJson1UnsupportedPlsLanguageExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1108
|
+
var contents, data, exception;
|
|
1109
|
+
return __generator(this, function (_a) {
|
|
1110
|
+
contents = map({});
|
|
1111
|
+
data = parsedOutput.body;
|
|
1112
|
+
if (data.message != null) {
|
|
1113
|
+
contents.message = __expectString(data.message);
|
|
1114
|
+
}
|
|
1115
|
+
exception = new UnsupportedPlsLanguageException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1116
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1117
|
+
});
|
|
1118
|
+
}); };
|
|
1119
|
+
var serializeAws_restJson1LexiconNameList = function (input, context) {
|
|
862
1120
|
return input
|
|
863
|
-
.filter((e)
|
|
864
|
-
.map((entry)
|
|
1121
|
+
.filter(function (e) { return e != null; })
|
|
1122
|
+
.map(function (entry) {
|
|
865
1123
|
return entry;
|
|
866
1124
|
});
|
|
867
1125
|
};
|
|
868
|
-
|
|
1126
|
+
var serializeAws_restJson1SpeechMarkTypeList = function (input, context) {
|
|
869
1127
|
return input
|
|
870
|
-
.filter((e)
|
|
871
|
-
.map((entry)
|
|
1128
|
+
.filter(function (e) { return e != null; })
|
|
1129
|
+
.map(function (entry) {
|
|
872
1130
|
return entry;
|
|
873
1131
|
});
|
|
874
1132
|
};
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
.filter((e)
|
|
878
|
-
.map((entry)
|
|
1133
|
+
var deserializeAws_restJson1EngineList = function (output, context) {
|
|
1134
|
+
var retVal = (output || [])
|
|
1135
|
+
.filter(function (e) { return e != null; })
|
|
1136
|
+
.map(function (entry) {
|
|
879
1137
|
if (entry === null) {
|
|
880
1138
|
return null;
|
|
881
1139
|
}
|
|
@@ -883,10 +1141,10 @@ const deserializeAws_restJson1EngineList = (output, context) => {
|
|
|
883
1141
|
});
|
|
884
1142
|
return retVal;
|
|
885
1143
|
};
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
.filter((e)
|
|
889
|
-
.map((entry)
|
|
1144
|
+
var deserializeAws_restJson1LanguageCodeList = function (output, context) {
|
|
1145
|
+
var retVal = (output || [])
|
|
1146
|
+
.filter(function (e) { return e != null; })
|
|
1147
|
+
.map(function (entry) {
|
|
890
1148
|
if (entry === null) {
|
|
891
1149
|
return null;
|
|
892
1150
|
}
|
|
@@ -894,13 +1152,13 @@ const deserializeAws_restJson1LanguageCodeList = (output, context) => {
|
|
|
894
1152
|
});
|
|
895
1153
|
return retVal;
|
|
896
1154
|
};
|
|
897
|
-
|
|
1155
|
+
var deserializeAws_restJson1Lexicon = function (output, context) {
|
|
898
1156
|
return {
|
|
899
1157
|
Content: __expectString(output.Content),
|
|
900
1158
|
Name: __expectString(output.Name),
|
|
901
1159
|
};
|
|
902
1160
|
};
|
|
903
|
-
|
|
1161
|
+
var deserializeAws_restJson1LexiconAttributes = function (output, context) {
|
|
904
1162
|
return {
|
|
905
1163
|
Alphabet: __expectString(output.Alphabet),
|
|
906
1164
|
LanguageCode: __expectString(output.LanguageCode),
|
|
@@ -912,16 +1170,16 @@ const deserializeAws_restJson1LexiconAttributes = (output, context) => {
|
|
|
912
1170
|
Size: __expectInt32(output.Size),
|
|
913
1171
|
};
|
|
914
1172
|
};
|
|
915
|
-
|
|
1173
|
+
var deserializeAws_restJson1LexiconDescription = function (output, context) {
|
|
916
1174
|
return {
|
|
917
1175
|
Attributes: output.Attributes != null ? deserializeAws_restJson1LexiconAttributes(output.Attributes, context) : undefined,
|
|
918
1176
|
Name: __expectString(output.Name),
|
|
919
1177
|
};
|
|
920
1178
|
};
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
.filter((e)
|
|
924
|
-
.map((entry)
|
|
1179
|
+
var deserializeAws_restJson1LexiconDescriptionList = function (output, context) {
|
|
1180
|
+
var retVal = (output || [])
|
|
1181
|
+
.filter(function (e) { return e != null; })
|
|
1182
|
+
.map(function (entry) {
|
|
925
1183
|
if (entry === null) {
|
|
926
1184
|
return null;
|
|
927
1185
|
}
|
|
@@ -929,10 +1187,10 @@ const deserializeAws_restJson1LexiconDescriptionList = (output, context) => {
|
|
|
929
1187
|
});
|
|
930
1188
|
return retVal;
|
|
931
1189
|
};
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
.filter((e)
|
|
935
|
-
.map((entry)
|
|
1190
|
+
var deserializeAws_restJson1LexiconNameList = function (output, context) {
|
|
1191
|
+
var retVal = (output || [])
|
|
1192
|
+
.filter(function (e) { return e != null; })
|
|
1193
|
+
.map(function (entry) {
|
|
936
1194
|
if (entry === null) {
|
|
937
1195
|
return null;
|
|
938
1196
|
}
|
|
@@ -940,10 +1198,10 @@ const deserializeAws_restJson1LexiconNameList = (output, context) => {
|
|
|
940
1198
|
});
|
|
941
1199
|
return retVal;
|
|
942
1200
|
};
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
.filter((e)
|
|
946
|
-
.map((entry)
|
|
1201
|
+
var deserializeAws_restJson1SpeechMarkTypeList = function (output, context) {
|
|
1202
|
+
var retVal = (output || [])
|
|
1203
|
+
.filter(function (e) { return e != null; })
|
|
1204
|
+
.map(function (entry) {
|
|
947
1205
|
if (entry === null) {
|
|
948
1206
|
return null;
|
|
949
1207
|
}
|
|
@@ -951,7 +1209,7 @@ const deserializeAws_restJson1SpeechMarkTypeList = (output, context) => {
|
|
|
951
1209
|
});
|
|
952
1210
|
return retVal;
|
|
953
1211
|
};
|
|
954
|
-
|
|
1212
|
+
var deserializeAws_restJson1SynthesisTask = function (output, context) {
|
|
955
1213
|
return {
|
|
956
1214
|
CreationTime: output.CreationTime != null
|
|
957
1215
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime)))
|
|
@@ -974,10 +1232,10 @@ const deserializeAws_restJson1SynthesisTask = (output, context) => {
|
|
|
974
1232
|
VoiceId: __expectString(output.VoiceId),
|
|
975
1233
|
};
|
|
976
1234
|
};
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
.filter((e)
|
|
980
|
-
.map((entry)
|
|
1235
|
+
var deserializeAws_restJson1SynthesisTasks = function (output, context) {
|
|
1236
|
+
var retVal = (output || [])
|
|
1237
|
+
.filter(function (e) { return e != null; })
|
|
1238
|
+
.map(function (entry) {
|
|
981
1239
|
if (entry === null) {
|
|
982
1240
|
return null;
|
|
983
1241
|
}
|
|
@@ -985,7 +1243,7 @@ const deserializeAws_restJson1SynthesisTasks = (output, context) => {
|
|
|
985
1243
|
});
|
|
986
1244
|
return retVal;
|
|
987
1245
|
};
|
|
988
|
-
|
|
1246
|
+
var deserializeAws_restJson1Voice = function (output, context) {
|
|
989
1247
|
return {
|
|
990
1248
|
AdditionalLanguageCodes: output.AdditionalLanguageCodes != null
|
|
991
1249
|
? deserializeAws_restJson1LanguageCodeList(output.AdditionalLanguageCodes, context)
|
|
@@ -1000,10 +1258,10 @@ const deserializeAws_restJson1Voice = (output, context) => {
|
|
|
1000
1258
|
: undefined,
|
|
1001
1259
|
};
|
|
1002
1260
|
};
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
.filter((e)
|
|
1006
|
-
.map((entry)
|
|
1261
|
+
var deserializeAws_restJson1VoiceList = function (output, context) {
|
|
1262
|
+
var retVal = (output || [])
|
|
1263
|
+
.filter(function (e) { return e != null; })
|
|
1264
|
+
.map(function (entry) {
|
|
1007
1265
|
if (entry === null) {
|
|
1008
1266
|
return null;
|
|
1009
1267
|
}
|
|
@@ -1011,39 +1269,57 @@ const deserializeAws_restJson1VoiceList = (output, context) => {
|
|
|
1011
1269
|
});
|
|
1012
1270
|
return retVal;
|
|
1013
1271
|
};
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1272
|
+
var deserializeMetadata = function (output) {
|
|
1273
|
+
var _a, _b;
|
|
1274
|
+
return ({
|
|
1275
|
+
httpStatusCode: output.statusCode,
|
|
1276
|
+
requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
|
|
1277
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1278
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1279
|
+
});
|
|
1280
|
+
};
|
|
1281
|
+
var collectBody = function (streamBody, context) {
|
|
1282
|
+
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1021
1283
|
if (streamBody instanceof Uint8Array) {
|
|
1022
1284
|
return Promise.resolve(streamBody);
|
|
1023
1285
|
}
|
|
1024
1286
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1025
1287
|
};
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
}
|
|
1036
|
-
return {};
|
|
1037
|
-
});
|
|
1038
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1039
|
-
const value = await parseBody(errorBody, context);
|
|
1040
|
-
value.message = value.message ?? value.Message;
|
|
1041
|
-
return value;
|
|
1288
|
+
var collectBodyString = function (streamBody, context) {
|
|
1289
|
+
return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
|
|
1290
|
+
};
|
|
1291
|
+
var isSerializableHeaderValue = function (value) {
|
|
1292
|
+
return value !== undefined &&
|
|
1293
|
+
value !== null &&
|
|
1294
|
+
value !== "" &&
|
|
1295
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1296
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1042
1297
|
};
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1298
|
+
var parseBody = function (streamBody, context) {
|
|
1299
|
+
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
1300
|
+
if (encoded.length) {
|
|
1301
|
+
return JSON.parse(encoded);
|
|
1302
|
+
}
|
|
1303
|
+
return {};
|
|
1304
|
+
});
|
|
1305
|
+
};
|
|
1306
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1307
|
+
var value;
|
|
1308
|
+
var _a;
|
|
1309
|
+
return __generator(this, function (_b) {
|
|
1310
|
+
switch (_b.label) {
|
|
1311
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
1312
|
+
case 1:
|
|
1313
|
+
value = _b.sent();
|
|
1314
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1315
|
+
return [2, value];
|
|
1316
|
+
}
|
|
1317
|
+
});
|
|
1318
|
+
}); };
|
|
1319
|
+
var loadRestJsonErrorCode = function (output, data) {
|
|
1320
|
+
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
1321
|
+
var sanitizeErrorCode = function (rawValue) {
|
|
1322
|
+
var cleanValue = rawValue;
|
|
1047
1323
|
if (typeof cleanValue === "number") {
|
|
1048
1324
|
cleanValue = cleanValue.toString();
|
|
1049
1325
|
}
|
|
@@ -1058,7 +1334,7 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
1058
1334
|
}
|
|
1059
1335
|
return cleanValue;
|
|
1060
1336
|
};
|
|
1061
|
-
|
|
1337
|
+
var headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1062
1338
|
if (headerKey !== undefined) {
|
|
1063
1339
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1064
1340
|
}
|