@aws-sdk/client-polly 3.476.0 → 3.477.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.
@@ -1,157 +1,102 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_SynthesizeSpeechCommand = exports.de_StartSpeechSynthesisTaskCommand = exports.de_PutLexiconCommand = exports.de_ListSpeechSynthesisTasksCommand = exports.de_ListLexiconsCommand = exports.de_GetSpeechSynthesisTaskCommand = exports.de_GetLexiconCommand = exports.de_DescribeVoicesCommand = exports.de_DeleteLexiconCommand = exports.se_SynthesizeSpeechCommand = exports.se_StartSpeechSynthesisTaskCommand = exports.se_PutLexiconCommand = exports.se_ListSpeechSynthesisTasksCommand = exports.se_ListLexiconsCommand = exports.se_GetSpeechSynthesisTaskCommand = exports.se_GetLexiconCommand = exports.se_DescribeVoicesCommand = exports.se_DeleteLexiconCommand = void 0;
4
- const protocol_http_1 = require("@smithy/protocol-http");
4
+ const core_1 = require("@smithy/core");
5
5
  const smithy_client_1 = require("@smithy/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const PollyServiceException_1 = require("../models/PollyServiceException");
8
8
  const se_DeleteLexiconCommand = async (input, context) => {
9
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
9
+ const b = (0, core_1.requestBuilder)(input, context);
10
10
  const headers = {};
11
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/lexicons/{Name}";
12
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
11
+ b.bp("/v1/lexicons/{Name}");
12
+ b.p("Name", () => input.Name, "{Name}", false);
13
13
  let body;
14
- return new protocol_http_1.HttpRequest({
15
- protocol,
16
- hostname,
17
- port,
18
- method: "DELETE",
19
- headers,
20
- path: resolvedPath,
21
- body,
22
- });
14
+ b.m("DELETE").h(headers).b(body);
15
+ return b.build();
23
16
  };
24
17
  exports.se_DeleteLexiconCommand = se_DeleteLexiconCommand;
25
18
  const se_DescribeVoicesCommand = async (input, context) => {
26
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
19
+ const b = (0, core_1.requestBuilder)(input, context);
27
20
  const headers = {};
28
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/voices";
21
+ b.bp("/v1/voices");
29
22
  const query = (0, smithy_client_1.map)({
30
- Engine: [, input.Engine],
31
- LanguageCode: [, input.LanguageCode],
32
- IncludeAdditionalLanguageCodes: [
33
- () => input.IncludeAdditionalLanguageCodes !== void 0,
34
- () => input.IncludeAdditionalLanguageCodes.toString(),
35
- ],
36
- NextToken: [, input.NextToken],
23
+ [_E]: [, input[_E]],
24
+ [_LC]: [, input[_LC]],
25
+ [_IALC]: [() => input.IncludeAdditionalLanguageCodes !== void 0, () => input[_IALC].toString()],
26
+ [_NT]: [, input[_NT]],
37
27
  });
38
28
  let body;
39
- return new protocol_http_1.HttpRequest({
40
- protocol,
41
- hostname,
42
- port,
43
- method: "GET",
44
- headers,
45
- path: resolvedPath,
46
- query,
47
- body,
48
- });
29
+ b.m("GET").h(headers).q(query).b(body);
30
+ return b.build();
49
31
  };
50
32
  exports.se_DescribeVoicesCommand = se_DescribeVoicesCommand;
51
33
  const se_GetLexiconCommand = async (input, context) => {
52
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
34
+ const b = (0, core_1.requestBuilder)(input, context);
53
35
  const headers = {};
54
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/lexicons/{Name}";
55
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
36
+ b.bp("/v1/lexicons/{Name}");
37
+ b.p("Name", () => input.Name, "{Name}", false);
56
38
  let body;
57
- return new protocol_http_1.HttpRequest({
58
- protocol,
59
- hostname,
60
- port,
61
- method: "GET",
62
- headers,
63
- path: resolvedPath,
64
- body,
65
- });
39
+ b.m("GET").h(headers).b(body);
40
+ return b.build();
66
41
  };
67
42
  exports.se_GetLexiconCommand = se_GetLexiconCommand;
68
43
  const se_GetSpeechSynthesisTaskCommand = async (input, context) => {
69
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
44
+ const b = (0, core_1.requestBuilder)(input, context);
70
45
  const headers = {};
71
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/synthesisTasks/{TaskId}";
72
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "TaskId", () => input.TaskId, "{TaskId}", false);
46
+ b.bp("/v1/synthesisTasks/{TaskId}");
47
+ b.p("TaskId", () => input.TaskId, "{TaskId}", false);
73
48
  let body;
74
- return new protocol_http_1.HttpRequest({
75
- protocol,
76
- hostname,
77
- port,
78
- method: "GET",
79
- headers,
80
- path: resolvedPath,
81
- body,
82
- });
49
+ b.m("GET").h(headers).b(body);
50
+ return b.build();
83
51
  };
84
52
  exports.se_GetSpeechSynthesisTaskCommand = se_GetSpeechSynthesisTaskCommand;
85
53
  const se_ListLexiconsCommand = async (input, context) => {
86
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
54
+ const b = (0, core_1.requestBuilder)(input, context);
87
55
  const headers = {};
88
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/lexicons";
56
+ b.bp("/v1/lexicons");
89
57
  const query = (0, smithy_client_1.map)({
90
- NextToken: [, input.NextToken],
58
+ [_NT]: [, input[_NT]],
91
59
  });
92
60
  let body;
93
- return new protocol_http_1.HttpRequest({
94
- protocol,
95
- hostname,
96
- port,
97
- method: "GET",
98
- headers,
99
- path: resolvedPath,
100
- query,
101
- body,
102
- });
61
+ b.m("GET").h(headers).q(query).b(body);
62
+ return b.build();
103
63
  };
104
64
  exports.se_ListLexiconsCommand = se_ListLexiconsCommand;
105
65
  const se_ListSpeechSynthesisTasksCommand = async (input, context) => {
106
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
66
+ const b = (0, core_1.requestBuilder)(input, context);
107
67
  const headers = {};
108
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/synthesisTasks";
68
+ b.bp("/v1/synthesisTasks");
109
69
  const query = (0, smithy_client_1.map)({
110
- MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
111
- NextToken: [, input.NextToken],
112
- Status: [, input.Status],
70
+ [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
71
+ [_NT]: [, input[_NT]],
72
+ [_S]: [, input[_S]],
113
73
  });
114
74
  let body;
115
- return new protocol_http_1.HttpRequest({
116
- protocol,
117
- hostname,
118
- port,
119
- method: "GET",
120
- headers,
121
- path: resolvedPath,
122
- query,
123
- body,
124
- });
75
+ b.m("GET").h(headers).q(query).b(body);
76
+ return b.build();
125
77
  };
126
78
  exports.se_ListSpeechSynthesisTasksCommand = se_ListSpeechSynthesisTasksCommand;
127
79
  const se_PutLexiconCommand = async (input, context) => {
128
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
80
+ const b = (0, core_1.requestBuilder)(input, context);
129
81
  const headers = {
130
82
  "content-type": "application/json",
131
83
  };
132
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/lexicons/{Name}";
133
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
84
+ b.bp("/v1/lexicons/{Name}");
85
+ b.p("Name", () => input.Name, "{Name}", false);
134
86
  let body;
135
87
  body = JSON.stringify((0, smithy_client_1.take)(input, {
136
88
  Content: [],
137
89
  }));
138
- return new protocol_http_1.HttpRequest({
139
- protocol,
140
- hostname,
141
- port,
142
- method: "PUT",
143
- headers,
144
- path: resolvedPath,
145
- body,
146
- });
90
+ b.m("PUT").h(headers).b(body);
91
+ return b.build();
147
92
  };
148
93
  exports.se_PutLexiconCommand = se_PutLexiconCommand;
149
94
  const se_StartSpeechSynthesisTaskCommand = async (input, context) => {
150
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
95
+ const b = (0, core_1.requestBuilder)(input, context);
151
96
  const headers = {
152
97
  "content-type": "application/json",
153
98
  };
154
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/synthesisTasks";
99
+ b.bp("/v1/synthesisTasks");
155
100
  let body;
156
101
  body = JSON.stringify((0, smithy_client_1.take)(input, {
157
102
  Engine: [],
@@ -167,23 +112,16 @@ const se_StartSpeechSynthesisTaskCommand = async (input, context) => {
167
112
  TextType: [],
168
113
  VoiceId: [],
169
114
  }));
170
- return new protocol_http_1.HttpRequest({
171
- protocol,
172
- hostname,
173
- port,
174
- method: "POST",
175
- headers,
176
- path: resolvedPath,
177
- body,
178
- });
115
+ b.m("POST").h(headers).b(body);
116
+ return b.build();
179
117
  };
180
118
  exports.se_StartSpeechSynthesisTaskCommand = se_StartSpeechSynthesisTaskCommand;
181
119
  const se_SynthesizeSpeechCommand = async (input, context) => {
182
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
120
+ const b = (0, core_1.requestBuilder)(input, context);
183
121
  const headers = {
184
122
  "content-type": "application/json",
185
123
  };
186
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/speech";
124
+ b.bp("/v1/speech");
187
125
  let body;
188
126
  body = JSON.stringify((0, smithy_client_1.take)(input, {
189
127
  Engine: [],
@@ -196,15 +134,8 @@ const se_SynthesizeSpeechCommand = async (input, context) => {
196
134
  TextType: [],
197
135
  VoiceId: [],
198
136
  }));
199
- return new protocol_http_1.HttpRequest({
200
- protocol,
201
- hostname,
202
- port,
203
- method: "POST",
204
- headers,
205
- path: resolvedPath,
206
- body,
207
- });
137
+ b.m("POST").h(headers).b(body);
138
+ return b.build();
208
139
  };
209
140
  exports.se_SynthesizeSpeechCommand = se_SynthesizeSpeechCommand;
210
141
  const de_DeleteLexiconCommand = async (output, context) => {
@@ -553,11 +484,8 @@ const de_SynthesizeSpeechCommand = async (output, context) => {
553
484
  }
554
485
  const contents = (0, smithy_client_1.map)({
555
486
  $metadata: deserializeMetadata(output),
556
- ContentType: [, output.headers["content-type"]],
557
- RequestCharacters: [
558
- () => void 0 !== output.headers["x-amzn-requestcharacters"],
559
- () => (0, smithy_client_1.strictParseInt32)(output.headers["x-amzn-requestcharacters"]),
560
- ],
487
+ [_CT]: [, output.headers[_ct]],
488
+ [_RC]: [() => void 0 !== output.headers[_xar], () => (0, smithy_client_1.strictParseInt32)(output.headers[_xar])],
561
489
  });
562
490
  const data = output.body;
563
491
  context.sdkStreamMixin(data);
@@ -945,6 +873,16 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
945
873
  value !== "" &&
946
874
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
947
875
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
876
+ const _CT = "ContentType";
877
+ const _E = "Engine";
878
+ const _IALC = "IncludeAdditionalLanguageCodes";
879
+ const _LC = "LanguageCode";
880
+ const _MR = "MaxResults";
881
+ const _NT = "NextToken";
882
+ const _RC = "RequestCharacters";
883
+ const _S = "Status";
884
+ const _ct = "content-type";
885
+ const _xar = "x-amzn-requestcharacters";
948
886
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
949
887
  if (encoded.length) {
950
888
  return JSON.parse(encoded);
@@ -1,147 +1,92 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
3
3
  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
4
  import { PollyServiceException as __BaseException } from "../models/PollyServiceException";
5
5
  export const se_DeleteLexiconCommand = async (input, context) => {
6
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
6
+ const b = rb(input, context);
7
7
  const headers = {};
8
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/lexicons/{Name}";
9
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
8
+ b.bp("/v1/lexicons/{Name}");
9
+ b.p("Name", () => input.Name, "{Name}", false);
10
10
  let body;
11
- return new __HttpRequest({
12
- protocol,
13
- hostname,
14
- port,
15
- method: "DELETE",
16
- headers,
17
- path: resolvedPath,
18
- body,
19
- });
11
+ b.m("DELETE").h(headers).b(body);
12
+ return b.build();
20
13
  };
21
14
  export const se_DescribeVoicesCommand = async (input, context) => {
22
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
15
+ const b = rb(input, context);
23
16
  const headers = {};
24
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/voices";
17
+ b.bp("/v1/voices");
25
18
  const query = map({
26
- Engine: [, input.Engine],
27
- LanguageCode: [, input.LanguageCode],
28
- IncludeAdditionalLanguageCodes: [
29
- () => input.IncludeAdditionalLanguageCodes !== void 0,
30
- () => input.IncludeAdditionalLanguageCodes.toString(),
31
- ],
32
- NextToken: [, input.NextToken],
19
+ [_E]: [, input[_E]],
20
+ [_LC]: [, input[_LC]],
21
+ [_IALC]: [() => input.IncludeAdditionalLanguageCodes !== void 0, () => input[_IALC].toString()],
22
+ [_NT]: [, input[_NT]],
33
23
  });
34
24
  let body;
35
- return new __HttpRequest({
36
- protocol,
37
- hostname,
38
- port,
39
- method: "GET",
40
- headers,
41
- path: resolvedPath,
42
- query,
43
- body,
44
- });
25
+ b.m("GET").h(headers).q(query).b(body);
26
+ return b.build();
45
27
  };
46
28
  export const se_GetLexiconCommand = async (input, context) => {
47
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
29
+ const b = rb(input, context);
48
30
  const headers = {};
49
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/lexicons/{Name}";
50
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
31
+ b.bp("/v1/lexicons/{Name}");
32
+ b.p("Name", () => input.Name, "{Name}", false);
51
33
  let body;
52
- return new __HttpRequest({
53
- protocol,
54
- hostname,
55
- port,
56
- method: "GET",
57
- headers,
58
- path: resolvedPath,
59
- body,
60
- });
34
+ b.m("GET").h(headers).b(body);
35
+ return b.build();
61
36
  };
62
37
  export const se_GetSpeechSynthesisTaskCommand = async (input, context) => {
63
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
38
+ const b = rb(input, context);
64
39
  const headers = {};
65
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/synthesisTasks/{TaskId}";
66
- resolvedPath = __resolvedPath(resolvedPath, input, "TaskId", () => input.TaskId, "{TaskId}", false);
40
+ b.bp("/v1/synthesisTasks/{TaskId}");
41
+ b.p("TaskId", () => input.TaskId, "{TaskId}", false);
67
42
  let body;
68
- return new __HttpRequest({
69
- protocol,
70
- hostname,
71
- port,
72
- method: "GET",
73
- headers,
74
- path: resolvedPath,
75
- body,
76
- });
43
+ b.m("GET").h(headers).b(body);
44
+ return b.build();
77
45
  };
78
46
  export const se_ListLexiconsCommand = async (input, context) => {
79
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
47
+ const b = rb(input, context);
80
48
  const headers = {};
81
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/lexicons";
49
+ b.bp("/v1/lexicons");
82
50
  const query = map({
83
- NextToken: [, input.NextToken],
51
+ [_NT]: [, input[_NT]],
84
52
  });
85
53
  let body;
86
- return new __HttpRequest({
87
- protocol,
88
- hostname,
89
- port,
90
- method: "GET",
91
- headers,
92
- path: resolvedPath,
93
- query,
94
- body,
95
- });
54
+ b.m("GET").h(headers).q(query).b(body);
55
+ return b.build();
96
56
  };
97
57
  export const se_ListSpeechSynthesisTasksCommand = async (input, context) => {
98
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
58
+ const b = rb(input, context);
99
59
  const headers = {};
100
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/synthesisTasks";
60
+ b.bp("/v1/synthesisTasks");
101
61
  const query = map({
102
- MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
103
- NextToken: [, input.NextToken],
104
- Status: [, input.Status],
62
+ [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
63
+ [_NT]: [, input[_NT]],
64
+ [_S]: [, input[_S]],
105
65
  });
106
66
  let body;
107
- return new __HttpRequest({
108
- protocol,
109
- hostname,
110
- port,
111
- method: "GET",
112
- headers,
113
- path: resolvedPath,
114
- query,
115
- body,
116
- });
67
+ b.m("GET").h(headers).q(query).b(body);
68
+ return b.build();
117
69
  };
118
70
  export const se_PutLexiconCommand = async (input, context) => {
119
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
71
+ const b = rb(input, context);
120
72
  const headers = {
121
73
  "content-type": "application/json",
122
74
  };
123
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/lexicons/{Name}";
124
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
75
+ b.bp("/v1/lexicons/{Name}");
76
+ b.p("Name", () => input.Name, "{Name}", false);
125
77
  let body;
126
78
  body = JSON.stringify(take(input, {
127
79
  Content: [],
128
80
  }));
129
- return new __HttpRequest({
130
- protocol,
131
- hostname,
132
- port,
133
- method: "PUT",
134
- headers,
135
- path: resolvedPath,
136
- body,
137
- });
81
+ b.m("PUT").h(headers).b(body);
82
+ return b.build();
138
83
  };
139
84
  export const se_StartSpeechSynthesisTaskCommand = async (input, context) => {
140
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
85
+ const b = rb(input, context);
141
86
  const headers = {
142
87
  "content-type": "application/json",
143
88
  };
144
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/synthesisTasks";
89
+ b.bp("/v1/synthesisTasks");
145
90
  let body;
146
91
  body = JSON.stringify(take(input, {
147
92
  Engine: [],
@@ -157,22 +102,15 @@ export const se_StartSpeechSynthesisTaskCommand = async (input, context) => {
157
102
  TextType: [],
158
103
  VoiceId: [],
159
104
  }));
160
- return new __HttpRequest({
161
- protocol,
162
- hostname,
163
- port,
164
- method: "POST",
165
- headers,
166
- path: resolvedPath,
167
- body,
168
- });
105
+ b.m("POST").h(headers).b(body);
106
+ return b.build();
169
107
  };
170
108
  export const se_SynthesizeSpeechCommand = async (input, context) => {
171
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
109
+ const b = rb(input, context);
172
110
  const headers = {
173
111
  "content-type": "application/json",
174
112
  };
175
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/speech";
113
+ b.bp("/v1/speech");
176
114
  let body;
177
115
  body = JSON.stringify(take(input, {
178
116
  Engine: [],
@@ -185,15 +123,8 @@ export const se_SynthesizeSpeechCommand = async (input, context) => {
185
123
  TextType: [],
186
124
  VoiceId: [],
187
125
  }));
188
- return new __HttpRequest({
189
- protocol,
190
- hostname,
191
- port,
192
- method: "POST",
193
- headers,
194
- path: resolvedPath,
195
- body,
196
- });
126
+ b.m("POST").h(headers).b(body);
127
+ return b.build();
197
128
  };
198
129
  export const de_DeleteLexiconCommand = async (output, context) => {
199
130
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -533,11 +464,8 @@ export const de_SynthesizeSpeechCommand = async (output, context) => {
533
464
  }
534
465
  const contents = map({
535
466
  $metadata: deserializeMetadata(output),
536
- ContentType: [, output.headers["content-type"]],
537
- RequestCharacters: [
538
- () => void 0 !== output.headers["x-amzn-requestcharacters"],
539
- () => __strictParseInt32(output.headers["x-amzn-requestcharacters"]),
540
- ],
467
+ [_CT]: [, output.headers[_ct]],
468
+ [_RC]: [() => void 0 !== output.headers[_xar], () => __strictParseInt32(output.headers[_xar])],
541
469
  });
542
470
  const data = output.body;
543
471
  context.sdkStreamMixin(data);
@@ -924,6 +852,16 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
924
852
  value !== "" &&
925
853
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
926
854
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
855
+ const _CT = "ContentType";
856
+ const _E = "Engine";
857
+ const _IALC = "IncludeAdditionalLanguageCodes";
858
+ const _LC = "LanguageCode";
859
+ const _MR = "MaxResults";
860
+ const _NT = "NextToken";
861
+ const _RC = "RequestCharacters";
862
+ const _S = "Status";
863
+ const _ct = "content-type";
864
+ const _xar = "x-amzn-requestcharacters";
927
865
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
928
866
  if (encoded.length) {
929
867
  return JSON.parse(encoded);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-polly",
3
3
  "description": "AWS SDK for JavaScript Polly Client for Node.js, Browser and React Native",
4
- "version": "3.476.0",
4
+ "version": "3.477.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.476.0",
24
- "@aws-sdk/core": "3.476.0",
25
- "@aws-sdk/credential-provider-node": "3.476.0",
23
+ "@aws-sdk/client-sts": "3.477.0",
24
+ "@aws-sdk/core": "3.477.0",
25
+ "@aws-sdk/credential-provider-node": "3.477.0",
26
26
  "@aws-sdk/middleware-host-header": "3.468.0",
27
27
  "@aws-sdk/middleware-logger": "3.468.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.468.0",
@@ -34,6 +34,7 @@
34
34
  "@aws-sdk/util-user-agent-browser": "3.468.0",
35
35
  "@aws-sdk/util-user-agent-node": "3.470.0",
36
36
  "@smithy/config-resolver": "^2.0.21",
37
+ "@smithy/core": "^1.2.0",
37
38
  "@smithy/fetch-http-handler": "^2.3.1",
38
39
  "@smithy/hash-node": "^2.0.17",
39
40
  "@smithy/invalid-dependency": "^2.0.15",