@aws-sdk/client-translate 3.35.0 → 3.38.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.
Files changed (182) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/dist-cjs/Translate.js +0 -5
  3. package/dist-cjs/TranslateClient.js +0 -10
  4. package/dist-cjs/commands/CreateParallelDataCommand.js +0 -28
  5. package/dist-cjs/commands/DeleteParallelDataCommand.js +0 -25
  6. package/dist-cjs/commands/DeleteTerminologyCommand.js +0 -25
  7. package/dist-cjs/commands/DescribeTextTranslationJobCommand.js +0 -26
  8. package/dist-cjs/commands/GetParallelDataCommand.js +0 -25
  9. package/dist-cjs/commands/GetTerminologyCommand.js +0 -25
  10. package/dist-cjs/commands/ImportTerminologyCommand.js +0 -32
  11. package/dist-cjs/commands/ListParallelDataCommand.js +0 -25
  12. package/dist-cjs/commands/ListTerminologiesCommand.js +0 -25
  13. package/dist-cjs/commands/ListTextTranslationJobsCommand.js +0 -25
  14. package/dist-cjs/commands/StartTextTranslationJobCommand.js +0 -32
  15. package/dist-cjs/commands/StopTextTranslationJobCommand.js +0 -31
  16. package/dist-cjs/commands/TranslateTextCommand.js +0 -26
  17. package/dist-cjs/commands/UpdateParallelDataCommand.js +0 -26
  18. package/dist-cjs/commands/index.js +17 -0
  19. package/dist-cjs/endpoints.js +1 -2
  20. package/dist-cjs/index.js +4 -21
  21. package/dist-cjs/models/index.js +0 -1
  22. package/dist-cjs/models/models_0.js +0 -163
  23. package/dist-cjs/pagination/Interfaces.js +0 -1
  24. package/dist-cjs/pagination/ListParallelDataPaginator.js +0 -11
  25. package/dist-cjs/pagination/ListTerminologiesPaginator.js +0 -11
  26. package/dist-cjs/pagination/ListTextTranslationJobsPaginator.js +0 -11
  27. package/dist-cjs/pagination/index.js +7 -0
  28. package/dist-cjs/protocols/Aws_json1_1.js +0 -6
  29. package/dist-cjs/runtimeConfig.browser.js +1 -6
  30. package/dist-cjs/runtimeConfig.js +2 -7
  31. package/dist-cjs/runtimeConfig.native.js +0 -4
  32. package/dist-cjs/runtimeConfig.shared.js +0 -4
  33. package/dist-es/Translate.js +0 -1
  34. package/dist-es/TranslateClient.js +0 -1
  35. package/dist-es/commands/CreateParallelDataCommand.js +0 -1
  36. package/dist-es/commands/DeleteParallelDataCommand.js +0 -1
  37. package/dist-es/commands/DeleteTerminologyCommand.js +0 -1
  38. package/dist-es/commands/DescribeTextTranslationJobCommand.js +0 -1
  39. package/dist-es/commands/GetParallelDataCommand.js +0 -1
  40. package/dist-es/commands/GetTerminologyCommand.js +0 -1
  41. package/dist-es/commands/ImportTerminologyCommand.js +0 -1
  42. package/dist-es/commands/ListParallelDataCommand.js +0 -1
  43. package/dist-es/commands/ListTerminologiesCommand.js +0 -1
  44. package/dist-es/commands/ListTextTranslationJobsCommand.js +0 -1
  45. package/dist-es/commands/StartTextTranslationJobCommand.js +0 -1
  46. package/dist-es/commands/StopTextTranslationJobCommand.js +0 -1
  47. package/dist-es/commands/TranslateTextCommand.js +0 -1
  48. package/dist-es/commands/UpdateParallelDataCommand.js +0 -1
  49. package/dist-es/commands/index.js +14 -0
  50. package/dist-es/endpoints.js +1 -2
  51. package/dist-es/index.js +4 -21
  52. package/dist-es/models/index.js +0 -1
  53. package/dist-es/models/models_0.js +0 -1
  54. package/dist-es/pagination/Interfaces.js +0 -1
  55. package/dist-es/pagination/ListParallelDataPaginator.js +0 -1
  56. package/dist-es/pagination/ListTerminologiesPaginator.js +0 -1
  57. package/dist-es/pagination/ListTextTranslationJobsPaginator.js +0 -1
  58. package/dist-es/pagination/index.js +4 -0
  59. package/dist-es/protocols/Aws_json1_1.js +0 -1
  60. package/dist-es/runtimeConfig.browser.js +1 -2
  61. package/dist-es/runtimeConfig.js +2 -3
  62. package/dist-es/runtimeConfig.native.js +0 -1
  63. package/dist-es/runtimeConfig.shared.js +0 -1
  64. package/dist-types/commands/index.d.ts +14 -0
  65. package/dist-types/index.d.ts +4 -20
  66. package/dist-types/pagination/index.d.ts +4 -0
  67. package/dist-types/ts3.4/Translate.d.ts +15 -72
  68. package/dist-types/ts3.4/TranslateClient.d.ts +24 -90
  69. package/dist-types/ts3.4/commands/CreateParallelDataCommand.d.ts +2 -23
  70. package/dist-types/ts3.4/commands/DeleteParallelDataCommand.d.ts +2 -20
  71. package/dist-types/ts3.4/commands/DeleteTerminologyCommand.d.ts +2 -20
  72. package/dist-types/ts3.4/commands/DescribeTextTranslationJobCommand.d.ts +2 -21
  73. package/dist-types/ts3.4/commands/GetParallelDataCommand.d.ts +2 -20
  74. package/dist-types/ts3.4/commands/GetTerminologyCommand.d.ts +2 -20
  75. package/dist-types/ts3.4/commands/ImportTerminologyCommand.d.ts +2 -27
  76. package/dist-types/ts3.4/commands/ListParallelDataCommand.d.ts +2 -20
  77. package/dist-types/ts3.4/commands/ListTerminologiesCommand.d.ts +2 -20
  78. package/dist-types/ts3.4/commands/ListTextTranslationJobsCommand.d.ts +2 -20
  79. package/dist-types/ts3.4/commands/StartTextTranslationJobCommand.d.ts +2 -27
  80. package/dist-types/ts3.4/commands/StopTextTranslationJobCommand.d.ts +2 -26
  81. package/dist-types/ts3.4/commands/TranslateTextCommand.d.ts +2 -21
  82. package/dist-types/ts3.4/commands/UpdateParallelDataCommand.d.ts +2 -21
  83. package/dist-types/ts3.4/commands/index.d.ts +14 -0
  84. package/dist-types/ts3.4/index.d.ts +4 -20
  85. package/dist-types/ts3.4/models/models_0.d.ts +220 -824
  86. package/dist-types/ts3.4/pagination/index.d.ts +4 -0
  87. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
  88. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
  89. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
  90. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
  91. package/package.json +33 -30
  92. package/dist-cjs/Translate.js.map +0 -1
  93. package/dist-cjs/TranslateClient.js.map +0 -1
  94. package/dist-cjs/commands/CreateParallelDataCommand.js.map +0 -1
  95. package/dist-cjs/commands/DeleteParallelDataCommand.js.map +0 -1
  96. package/dist-cjs/commands/DeleteTerminologyCommand.js.map +0 -1
  97. package/dist-cjs/commands/DescribeTextTranslationJobCommand.js.map +0 -1
  98. package/dist-cjs/commands/GetParallelDataCommand.js.map +0 -1
  99. package/dist-cjs/commands/GetTerminologyCommand.js.map +0 -1
  100. package/dist-cjs/commands/ImportTerminologyCommand.js.map +0 -1
  101. package/dist-cjs/commands/ListParallelDataCommand.js.map +0 -1
  102. package/dist-cjs/commands/ListTerminologiesCommand.js.map +0 -1
  103. package/dist-cjs/commands/ListTextTranslationJobsCommand.js.map +0 -1
  104. package/dist-cjs/commands/StartTextTranslationJobCommand.js.map +0 -1
  105. package/dist-cjs/commands/StopTextTranslationJobCommand.js.map +0 -1
  106. package/dist-cjs/commands/TranslateTextCommand.js.map +0 -1
  107. package/dist-cjs/commands/UpdateParallelDataCommand.js.map +0 -1
  108. package/dist-cjs/endpoints.js.map +0 -1
  109. package/dist-cjs/index.js.map +0 -1
  110. package/dist-cjs/models/index.js.map +0 -1
  111. package/dist-cjs/models/models_0.js.map +0 -1
  112. package/dist-cjs/pagination/Interfaces.js.map +0 -1
  113. package/dist-cjs/pagination/ListParallelDataPaginator.js.map +0 -1
  114. package/dist-cjs/pagination/ListTerminologiesPaginator.js.map +0 -1
  115. package/dist-cjs/pagination/ListTextTranslationJobsPaginator.js.map +0 -1
  116. package/dist-cjs/protocols/Aws_json1_1.js.map +0 -1
  117. package/dist-cjs/runtimeConfig.browser.js.map +0 -1
  118. package/dist-cjs/runtimeConfig.js.map +0 -1
  119. package/dist-cjs/runtimeConfig.native.js.map +0 -1
  120. package/dist-cjs/runtimeConfig.shared.js.map +0 -1
  121. package/dist-es/Translate.js.map +0 -1
  122. package/dist-es/TranslateClient.js.map +0 -1
  123. package/dist-es/commands/CreateParallelDataCommand.js.map +0 -1
  124. package/dist-es/commands/DeleteParallelDataCommand.js.map +0 -1
  125. package/dist-es/commands/DeleteTerminologyCommand.js.map +0 -1
  126. package/dist-es/commands/DescribeTextTranslationJobCommand.js.map +0 -1
  127. package/dist-es/commands/GetParallelDataCommand.js.map +0 -1
  128. package/dist-es/commands/GetTerminologyCommand.js.map +0 -1
  129. package/dist-es/commands/ImportTerminologyCommand.js.map +0 -1
  130. package/dist-es/commands/ListParallelDataCommand.js.map +0 -1
  131. package/dist-es/commands/ListTerminologiesCommand.js.map +0 -1
  132. package/dist-es/commands/ListTextTranslationJobsCommand.js.map +0 -1
  133. package/dist-es/commands/StartTextTranslationJobCommand.js.map +0 -1
  134. package/dist-es/commands/StopTextTranslationJobCommand.js.map +0 -1
  135. package/dist-es/commands/TranslateTextCommand.js.map +0 -1
  136. package/dist-es/commands/UpdateParallelDataCommand.js.map +0 -1
  137. package/dist-es/endpoints.js.map +0 -1
  138. package/dist-es/index.js.map +0 -1
  139. package/dist-es/models/index.js.map +0 -1
  140. package/dist-es/models/models_0.js.map +0 -1
  141. package/dist-es/pagination/Interfaces.js.map +0 -1
  142. package/dist-es/pagination/ListParallelDataPaginator.js.map +0 -1
  143. package/dist-es/pagination/ListTerminologiesPaginator.js.map +0 -1
  144. package/dist-es/pagination/ListTextTranslationJobsPaginator.js.map +0 -1
  145. package/dist-es/protocols/Aws_json1_1.js.map +0 -1
  146. package/dist-es/runtimeConfig.browser.js.map +0 -1
  147. package/dist-es/runtimeConfig.js.map +0 -1
  148. package/dist-es/runtimeConfig.native.js.map +0 -1
  149. package/dist-es/runtimeConfig.shared.js.map +0 -1
  150. package/jest.config.js +0 -4
  151. package/src/Translate.ts +0 -553
  152. package/src/TranslateClient.ts +0 -291
  153. package/src/commands/CreateParallelDataCommand.ts +0 -98
  154. package/src/commands/DeleteParallelDataCommand.ts +0 -95
  155. package/src/commands/DeleteTerminologyCommand.ts +0 -95
  156. package/src/commands/DescribeTextTranslationJobCommand.ts +0 -99
  157. package/src/commands/GetParallelDataCommand.ts +0 -95
  158. package/src/commands/GetTerminologyCommand.ts +0 -95
  159. package/src/commands/ImportTerminologyCommand.ts +0 -102
  160. package/src/commands/ListParallelDataCommand.ts +0 -95
  161. package/src/commands/ListTerminologiesCommand.ts +0 -95
  162. package/src/commands/ListTextTranslationJobsCommand.ts +0 -95
  163. package/src/commands/StartTextTranslationJobCommand.ts +0 -102
  164. package/src/commands/StopTextTranslationJobCommand.ts +0 -101
  165. package/src/commands/TranslateTextCommand.ts +0 -96
  166. package/src/commands/UpdateParallelDataCommand.ts +0 -96
  167. package/src/endpoints.ts +0 -77
  168. package/src/index.ts +0 -21
  169. package/src/models/index.ts +0 -1
  170. package/src/models/models_0.ts +0 -1625
  171. package/src/pagination/Interfaces.ts +0 -8
  172. package/src/pagination/ListParallelDataPaginator.ts +0 -59
  173. package/src/pagination/ListTerminologiesPaginator.ts +0 -59
  174. package/src/pagination/ListTextTranslationJobsPaginator.ts +0 -59
  175. package/src/protocols/Aws_json1_1.ts +0 -2523
  176. package/src/runtimeConfig.browser.ts +0 -41
  177. package/src/runtimeConfig.native.ts +0 -17
  178. package/src/runtimeConfig.shared.ts +0 -17
  179. package/src/runtimeConfig.ts +0 -46
  180. package/tsconfig.es.json +0 -10
  181. package/tsconfig.json +0 -33
  182. package/tsconfig.types.json +0 -9
package/src/Translate.ts DELETED
@@ -1,553 +0,0 @@
1
- import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
2
-
3
- import {
4
- CreateParallelDataCommand,
5
- CreateParallelDataCommandInput,
6
- CreateParallelDataCommandOutput,
7
- } from "./commands/CreateParallelDataCommand";
8
- import {
9
- DeleteParallelDataCommand,
10
- DeleteParallelDataCommandInput,
11
- DeleteParallelDataCommandOutput,
12
- } from "./commands/DeleteParallelDataCommand";
13
- import {
14
- DeleteTerminologyCommand,
15
- DeleteTerminologyCommandInput,
16
- DeleteTerminologyCommandOutput,
17
- } from "./commands/DeleteTerminologyCommand";
18
- import {
19
- DescribeTextTranslationJobCommand,
20
- DescribeTextTranslationJobCommandInput,
21
- DescribeTextTranslationJobCommandOutput,
22
- } from "./commands/DescribeTextTranslationJobCommand";
23
- import {
24
- GetParallelDataCommand,
25
- GetParallelDataCommandInput,
26
- GetParallelDataCommandOutput,
27
- } from "./commands/GetParallelDataCommand";
28
- import {
29
- GetTerminologyCommand,
30
- GetTerminologyCommandInput,
31
- GetTerminologyCommandOutput,
32
- } from "./commands/GetTerminologyCommand";
33
- import {
34
- ImportTerminologyCommand,
35
- ImportTerminologyCommandInput,
36
- ImportTerminologyCommandOutput,
37
- } from "./commands/ImportTerminologyCommand";
38
- import {
39
- ListParallelDataCommand,
40
- ListParallelDataCommandInput,
41
- ListParallelDataCommandOutput,
42
- } from "./commands/ListParallelDataCommand";
43
- import {
44
- ListTerminologiesCommand,
45
- ListTerminologiesCommandInput,
46
- ListTerminologiesCommandOutput,
47
- } from "./commands/ListTerminologiesCommand";
48
- import {
49
- ListTextTranslationJobsCommand,
50
- ListTextTranslationJobsCommandInput,
51
- ListTextTranslationJobsCommandOutput,
52
- } from "./commands/ListTextTranslationJobsCommand";
53
- import {
54
- StartTextTranslationJobCommand,
55
- StartTextTranslationJobCommandInput,
56
- StartTextTranslationJobCommandOutput,
57
- } from "./commands/StartTextTranslationJobCommand";
58
- import {
59
- StopTextTranslationJobCommand,
60
- StopTextTranslationJobCommandInput,
61
- StopTextTranslationJobCommandOutput,
62
- } from "./commands/StopTextTranslationJobCommand";
63
- import {
64
- TranslateTextCommand,
65
- TranslateTextCommandInput,
66
- TranslateTextCommandOutput,
67
- } from "./commands/TranslateTextCommand";
68
- import {
69
- UpdateParallelDataCommand,
70
- UpdateParallelDataCommandInput,
71
- UpdateParallelDataCommandOutput,
72
- } from "./commands/UpdateParallelDataCommand";
73
- import { TranslateClient } from "./TranslateClient";
74
-
75
- /**
76
- * <p>Provides translation between one source language and another of the same set of
77
- * languages.</p>
78
- */
79
- export class Translate extends TranslateClient {
80
- /**
81
- * <p>Creates a parallel data resource in Amazon Translate by importing an input file from
82
- * Amazon S3. Parallel data files contain examples of source phrases and their translations from
83
- * your translation memory. By adding parallel data, you can influence the style, tone, and word
84
- * choice in your translation output.</p>
85
- */
86
- public createParallelData(
87
- args: CreateParallelDataCommandInput,
88
- options?: __HttpHandlerOptions
89
- ): Promise<CreateParallelDataCommandOutput>;
90
- public createParallelData(
91
- args: CreateParallelDataCommandInput,
92
- cb: (err: any, data?: CreateParallelDataCommandOutput) => void
93
- ): void;
94
- public createParallelData(
95
- args: CreateParallelDataCommandInput,
96
- options: __HttpHandlerOptions,
97
- cb: (err: any, data?: CreateParallelDataCommandOutput) => void
98
- ): void;
99
- public createParallelData(
100
- args: CreateParallelDataCommandInput,
101
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateParallelDataCommandOutput) => void),
102
- cb?: (err: any, data?: CreateParallelDataCommandOutput) => void
103
- ): Promise<CreateParallelDataCommandOutput> | void {
104
- const command = new CreateParallelDataCommand(args);
105
- if (typeof optionsOrCb === "function") {
106
- this.send(command, optionsOrCb);
107
- } else if (typeof cb === "function") {
108
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
109
- this.send(command, optionsOrCb || {}, cb);
110
- } else {
111
- return this.send(command, optionsOrCb);
112
- }
113
- }
114
-
115
- /**
116
- * <p>Deletes a parallel data resource in Amazon Translate.</p>
117
- */
118
- public deleteParallelData(
119
- args: DeleteParallelDataCommandInput,
120
- options?: __HttpHandlerOptions
121
- ): Promise<DeleteParallelDataCommandOutput>;
122
- public deleteParallelData(
123
- args: DeleteParallelDataCommandInput,
124
- cb: (err: any, data?: DeleteParallelDataCommandOutput) => void
125
- ): void;
126
- public deleteParallelData(
127
- args: DeleteParallelDataCommandInput,
128
- options: __HttpHandlerOptions,
129
- cb: (err: any, data?: DeleteParallelDataCommandOutput) => void
130
- ): void;
131
- public deleteParallelData(
132
- args: DeleteParallelDataCommandInput,
133
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteParallelDataCommandOutput) => void),
134
- cb?: (err: any, data?: DeleteParallelDataCommandOutput) => void
135
- ): Promise<DeleteParallelDataCommandOutput> | void {
136
- const command = new DeleteParallelDataCommand(args);
137
- if (typeof optionsOrCb === "function") {
138
- this.send(command, optionsOrCb);
139
- } else if (typeof cb === "function") {
140
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
141
- this.send(command, optionsOrCb || {}, cb);
142
- } else {
143
- return this.send(command, optionsOrCb);
144
- }
145
- }
146
-
147
- /**
148
- * <p>A synchronous action that deletes a custom terminology.</p>
149
- */
150
- public deleteTerminology(
151
- args: DeleteTerminologyCommandInput,
152
- options?: __HttpHandlerOptions
153
- ): Promise<DeleteTerminologyCommandOutput>;
154
- public deleteTerminology(
155
- args: DeleteTerminologyCommandInput,
156
- cb: (err: any, data?: DeleteTerminologyCommandOutput) => void
157
- ): void;
158
- public deleteTerminology(
159
- args: DeleteTerminologyCommandInput,
160
- options: __HttpHandlerOptions,
161
- cb: (err: any, data?: DeleteTerminologyCommandOutput) => void
162
- ): void;
163
- public deleteTerminology(
164
- args: DeleteTerminologyCommandInput,
165
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteTerminologyCommandOutput) => void),
166
- cb?: (err: any, data?: DeleteTerminologyCommandOutput) => void
167
- ): Promise<DeleteTerminologyCommandOutput> | void {
168
- const command = new DeleteTerminologyCommand(args);
169
- if (typeof optionsOrCb === "function") {
170
- this.send(command, optionsOrCb);
171
- } else if (typeof cb === "function") {
172
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
173
- this.send(command, optionsOrCb || {}, cb);
174
- } else {
175
- return this.send(command, optionsOrCb);
176
- }
177
- }
178
-
179
- /**
180
- * <p>Gets the properties associated with an asycnhronous batch translation job including name,
181
- * ID, status, source and target languages, input/output S3 buckets, and so on.</p>
182
- */
183
- public describeTextTranslationJob(
184
- args: DescribeTextTranslationJobCommandInput,
185
- options?: __HttpHandlerOptions
186
- ): Promise<DescribeTextTranslationJobCommandOutput>;
187
- public describeTextTranslationJob(
188
- args: DescribeTextTranslationJobCommandInput,
189
- cb: (err: any, data?: DescribeTextTranslationJobCommandOutput) => void
190
- ): void;
191
- public describeTextTranslationJob(
192
- args: DescribeTextTranslationJobCommandInput,
193
- options: __HttpHandlerOptions,
194
- cb: (err: any, data?: DescribeTextTranslationJobCommandOutput) => void
195
- ): void;
196
- public describeTextTranslationJob(
197
- args: DescribeTextTranslationJobCommandInput,
198
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeTextTranslationJobCommandOutput) => void),
199
- cb?: (err: any, data?: DescribeTextTranslationJobCommandOutput) => void
200
- ): Promise<DescribeTextTranslationJobCommandOutput> | void {
201
- const command = new DescribeTextTranslationJobCommand(args);
202
- if (typeof optionsOrCb === "function") {
203
- this.send(command, optionsOrCb);
204
- } else if (typeof cb === "function") {
205
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
206
- this.send(command, optionsOrCb || {}, cb);
207
- } else {
208
- return this.send(command, optionsOrCb);
209
- }
210
- }
211
-
212
- /**
213
- * <p>Provides information about a parallel data resource.</p>
214
- */
215
- public getParallelData(
216
- args: GetParallelDataCommandInput,
217
- options?: __HttpHandlerOptions
218
- ): Promise<GetParallelDataCommandOutput>;
219
- public getParallelData(
220
- args: GetParallelDataCommandInput,
221
- cb: (err: any, data?: GetParallelDataCommandOutput) => void
222
- ): void;
223
- public getParallelData(
224
- args: GetParallelDataCommandInput,
225
- options: __HttpHandlerOptions,
226
- cb: (err: any, data?: GetParallelDataCommandOutput) => void
227
- ): void;
228
- public getParallelData(
229
- args: GetParallelDataCommandInput,
230
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetParallelDataCommandOutput) => void),
231
- cb?: (err: any, data?: GetParallelDataCommandOutput) => void
232
- ): Promise<GetParallelDataCommandOutput> | void {
233
- const command = new GetParallelDataCommand(args);
234
- if (typeof optionsOrCb === "function") {
235
- this.send(command, optionsOrCb);
236
- } else if (typeof cb === "function") {
237
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
238
- this.send(command, optionsOrCb || {}, cb);
239
- } else {
240
- return this.send(command, optionsOrCb);
241
- }
242
- }
243
-
244
- /**
245
- * <p>Retrieves a custom terminology.</p>
246
- */
247
- public getTerminology(
248
- args: GetTerminologyCommandInput,
249
- options?: __HttpHandlerOptions
250
- ): Promise<GetTerminologyCommandOutput>;
251
- public getTerminology(
252
- args: GetTerminologyCommandInput,
253
- cb: (err: any, data?: GetTerminologyCommandOutput) => void
254
- ): void;
255
- public getTerminology(
256
- args: GetTerminologyCommandInput,
257
- options: __HttpHandlerOptions,
258
- cb: (err: any, data?: GetTerminologyCommandOutput) => void
259
- ): void;
260
- public getTerminology(
261
- args: GetTerminologyCommandInput,
262
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetTerminologyCommandOutput) => void),
263
- cb?: (err: any, data?: GetTerminologyCommandOutput) => void
264
- ): Promise<GetTerminologyCommandOutput> | void {
265
- const command = new GetTerminologyCommand(args);
266
- if (typeof optionsOrCb === "function") {
267
- this.send(command, optionsOrCb);
268
- } else if (typeof cb === "function") {
269
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
270
- this.send(command, optionsOrCb || {}, cb);
271
- } else {
272
- return this.send(command, optionsOrCb);
273
- }
274
- }
275
-
276
- /**
277
- * <p>Creates or updates a custom terminology, depending on whether or not one already exists
278
- * for the given terminology name. Importing a terminology with the same name as an existing one
279
- * will merge the terminologies based on the chosen merge strategy. Currently, the only supported
280
- * merge strategy is OVERWRITE, and so the imported terminology will overwrite an existing
281
- * terminology of the same name.</p>
282
- * <p>If you import a terminology that overwrites an existing one, the new terminology take up
283
- * to 10 minutes to fully propagate and be available for use in a translation due to cache
284
- * policies with the DataPlane service that performs the translations.</p>
285
- */
286
- public importTerminology(
287
- args: ImportTerminologyCommandInput,
288
- options?: __HttpHandlerOptions
289
- ): Promise<ImportTerminologyCommandOutput>;
290
- public importTerminology(
291
- args: ImportTerminologyCommandInput,
292
- cb: (err: any, data?: ImportTerminologyCommandOutput) => void
293
- ): void;
294
- public importTerminology(
295
- args: ImportTerminologyCommandInput,
296
- options: __HttpHandlerOptions,
297
- cb: (err: any, data?: ImportTerminologyCommandOutput) => void
298
- ): void;
299
- public importTerminology(
300
- args: ImportTerminologyCommandInput,
301
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ImportTerminologyCommandOutput) => void),
302
- cb?: (err: any, data?: ImportTerminologyCommandOutput) => void
303
- ): Promise<ImportTerminologyCommandOutput> | void {
304
- const command = new ImportTerminologyCommand(args);
305
- if (typeof optionsOrCb === "function") {
306
- this.send(command, optionsOrCb);
307
- } else if (typeof cb === "function") {
308
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
309
- this.send(command, optionsOrCb || {}, cb);
310
- } else {
311
- return this.send(command, optionsOrCb);
312
- }
313
- }
314
-
315
- /**
316
- * <p>Provides a list of your parallel data resources in Amazon Translate.</p>
317
- */
318
- public listParallelData(
319
- args: ListParallelDataCommandInput,
320
- options?: __HttpHandlerOptions
321
- ): Promise<ListParallelDataCommandOutput>;
322
- public listParallelData(
323
- args: ListParallelDataCommandInput,
324
- cb: (err: any, data?: ListParallelDataCommandOutput) => void
325
- ): void;
326
- public listParallelData(
327
- args: ListParallelDataCommandInput,
328
- options: __HttpHandlerOptions,
329
- cb: (err: any, data?: ListParallelDataCommandOutput) => void
330
- ): void;
331
- public listParallelData(
332
- args: ListParallelDataCommandInput,
333
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListParallelDataCommandOutput) => void),
334
- cb?: (err: any, data?: ListParallelDataCommandOutput) => void
335
- ): Promise<ListParallelDataCommandOutput> | void {
336
- const command = new ListParallelDataCommand(args);
337
- if (typeof optionsOrCb === "function") {
338
- this.send(command, optionsOrCb);
339
- } else if (typeof cb === "function") {
340
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
341
- this.send(command, optionsOrCb || {}, cb);
342
- } else {
343
- return this.send(command, optionsOrCb);
344
- }
345
- }
346
-
347
- /**
348
- * <p>Provides a list of custom terminologies associated with your account.</p>
349
- */
350
- public listTerminologies(
351
- args: ListTerminologiesCommandInput,
352
- options?: __HttpHandlerOptions
353
- ): Promise<ListTerminologiesCommandOutput>;
354
- public listTerminologies(
355
- args: ListTerminologiesCommandInput,
356
- cb: (err: any, data?: ListTerminologiesCommandOutput) => void
357
- ): void;
358
- public listTerminologies(
359
- args: ListTerminologiesCommandInput,
360
- options: __HttpHandlerOptions,
361
- cb: (err: any, data?: ListTerminologiesCommandOutput) => void
362
- ): void;
363
- public listTerminologies(
364
- args: ListTerminologiesCommandInput,
365
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListTerminologiesCommandOutput) => void),
366
- cb?: (err: any, data?: ListTerminologiesCommandOutput) => void
367
- ): Promise<ListTerminologiesCommandOutput> | void {
368
- const command = new ListTerminologiesCommand(args);
369
- if (typeof optionsOrCb === "function") {
370
- this.send(command, optionsOrCb);
371
- } else if (typeof cb === "function") {
372
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
373
- this.send(command, optionsOrCb || {}, cb);
374
- } else {
375
- return this.send(command, optionsOrCb);
376
- }
377
- }
378
-
379
- /**
380
- * <p>Gets a list of the batch translation jobs that you have submitted.</p>
381
- */
382
- public listTextTranslationJobs(
383
- args: ListTextTranslationJobsCommandInput,
384
- options?: __HttpHandlerOptions
385
- ): Promise<ListTextTranslationJobsCommandOutput>;
386
- public listTextTranslationJobs(
387
- args: ListTextTranslationJobsCommandInput,
388
- cb: (err: any, data?: ListTextTranslationJobsCommandOutput) => void
389
- ): void;
390
- public listTextTranslationJobs(
391
- args: ListTextTranslationJobsCommandInput,
392
- options: __HttpHandlerOptions,
393
- cb: (err: any, data?: ListTextTranslationJobsCommandOutput) => void
394
- ): void;
395
- public listTextTranslationJobs(
396
- args: ListTextTranslationJobsCommandInput,
397
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListTextTranslationJobsCommandOutput) => void),
398
- cb?: (err: any, data?: ListTextTranslationJobsCommandOutput) => void
399
- ): Promise<ListTextTranslationJobsCommandOutput> | void {
400
- const command = new ListTextTranslationJobsCommand(args);
401
- if (typeof optionsOrCb === "function") {
402
- this.send(command, optionsOrCb);
403
- } else if (typeof cb === "function") {
404
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
405
- this.send(command, optionsOrCb || {}, cb);
406
- } else {
407
- return this.send(command, optionsOrCb);
408
- }
409
- }
410
-
411
- /**
412
- * <p>Starts an asynchronous batch translation job. Batch translation jobs can be used to
413
- * translate large volumes of text across multiple documents at once. For more information, see
414
- * <a>async</a>.</p>
415
- *
416
- * <p>Batch translation jobs can be described with the <a>DescribeTextTranslationJob</a> operation, listed with the <a>ListTextTranslationJobs</a> operation, and stopped with the <a>StopTextTranslationJob</a> operation.</p>
417
- * <note>
418
- * <p>Amazon Translate does not support batch translation of multiple source languages at once.</p>
419
- * </note>
420
- */
421
- public startTextTranslationJob(
422
- args: StartTextTranslationJobCommandInput,
423
- options?: __HttpHandlerOptions
424
- ): Promise<StartTextTranslationJobCommandOutput>;
425
- public startTextTranslationJob(
426
- args: StartTextTranslationJobCommandInput,
427
- cb: (err: any, data?: StartTextTranslationJobCommandOutput) => void
428
- ): void;
429
- public startTextTranslationJob(
430
- args: StartTextTranslationJobCommandInput,
431
- options: __HttpHandlerOptions,
432
- cb: (err: any, data?: StartTextTranslationJobCommandOutput) => void
433
- ): void;
434
- public startTextTranslationJob(
435
- args: StartTextTranslationJobCommandInput,
436
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StartTextTranslationJobCommandOutput) => void),
437
- cb?: (err: any, data?: StartTextTranslationJobCommandOutput) => void
438
- ): Promise<StartTextTranslationJobCommandOutput> | void {
439
- const command = new StartTextTranslationJobCommand(args);
440
- if (typeof optionsOrCb === "function") {
441
- this.send(command, optionsOrCb);
442
- } else if (typeof cb === "function") {
443
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
444
- this.send(command, optionsOrCb || {}, cb);
445
- } else {
446
- return this.send(command, optionsOrCb);
447
- }
448
- }
449
-
450
- /**
451
- * <p>Stops an asynchronous batch translation job that is in progress.</p>
452
- * <p>If the job's state is <code>IN_PROGRESS</code>, the job will be marked for termination and
453
- * put into the <code>STOP_REQUESTED</code> state. If the job completes before it can be stopped,
454
- * it is put into the <code>COMPLETED</code> state. Otherwise, the job is put into the
455
- * <code>STOPPED</code> state.</p>
456
- * <p>Asynchronous batch translation jobs are started with the <a>StartTextTranslationJob</a> operation. You can use the <a>DescribeTextTranslationJob</a> or <a>ListTextTranslationJobs</a>
457
- * operations to get a batch translation job's <code>JobId</code>.</p>
458
- */
459
- public stopTextTranslationJob(
460
- args: StopTextTranslationJobCommandInput,
461
- options?: __HttpHandlerOptions
462
- ): Promise<StopTextTranslationJobCommandOutput>;
463
- public stopTextTranslationJob(
464
- args: StopTextTranslationJobCommandInput,
465
- cb: (err: any, data?: StopTextTranslationJobCommandOutput) => void
466
- ): void;
467
- public stopTextTranslationJob(
468
- args: StopTextTranslationJobCommandInput,
469
- options: __HttpHandlerOptions,
470
- cb: (err: any, data?: StopTextTranslationJobCommandOutput) => void
471
- ): void;
472
- public stopTextTranslationJob(
473
- args: StopTextTranslationJobCommandInput,
474
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StopTextTranslationJobCommandOutput) => void),
475
- cb?: (err: any, data?: StopTextTranslationJobCommandOutput) => void
476
- ): Promise<StopTextTranslationJobCommandOutput> | void {
477
- const command = new StopTextTranslationJobCommand(args);
478
- if (typeof optionsOrCb === "function") {
479
- this.send(command, optionsOrCb);
480
- } else if (typeof cb === "function") {
481
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
482
- this.send(command, optionsOrCb || {}, cb);
483
- } else {
484
- return this.send(command, optionsOrCb);
485
- }
486
- }
487
-
488
- /**
489
- * <p>Translates input text from the source language to the target language. For a list of
490
- * available languages and language codes, see <a>what-is-languages</a>.</p>
491
- */
492
- public translateText(
493
- args: TranslateTextCommandInput,
494
- options?: __HttpHandlerOptions
495
- ): Promise<TranslateTextCommandOutput>;
496
- public translateText(
497
- args: TranslateTextCommandInput,
498
- cb: (err: any, data?: TranslateTextCommandOutput) => void
499
- ): void;
500
- public translateText(
501
- args: TranslateTextCommandInput,
502
- options: __HttpHandlerOptions,
503
- cb: (err: any, data?: TranslateTextCommandOutput) => void
504
- ): void;
505
- public translateText(
506
- args: TranslateTextCommandInput,
507
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: TranslateTextCommandOutput) => void),
508
- cb?: (err: any, data?: TranslateTextCommandOutput) => void
509
- ): Promise<TranslateTextCommandOutput> | void {
510
- const command = new TranslateTextCommand(args);
511
- if (typeof optionsOrCb === "function") {
512
- this.send(command, optionsOrCb);
513
- } else if (typeof cb === "function") {
514
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
515
- this.send(command, optionsOrCb || {}, cb);
516
- } else {
517
- return this.send(command, optionsOrCb);
518
- }
519
- }
520
-
521
- /**
522
- * <p>Updates a previously created parallel data resource by importing a new input file from
523
- * Amazon S3.</p>
524
- */
525
- public updateParallelData(
526
- args: UpdateParallelDataCommandInput,
527
- options?: __HttpHandlerOptions
528
- ): Promise<UpdateParallelDataCommandOutput>;
529
- public updateParallelData(
530
- args: UpdateParallelDataCommandInput,
531
- cb: (err: any, data?: UpdateParallelDataCommandOutput) => void
532
- ): void;
533
- public updateParallelData(
534
- args: UpdateParallelDataCommandInput,
535
- options: __HttpHandlerOptions,
536
- cb: (err: any, data?: UpdateParallelDataCommandOutput) => void
537
- ): void;
538
- public updateParallelData(
539
- args: UpdateParallelDataCommandInput,
540
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateParallelDataCommandOutput) => void),
541
- cb?: (err: any, data?: UpdateParallelDataCommandOutput) => void
542
- ): Promise<UpdateParallelDataCommandOutput> | void {
543
- const command = new UpdateParallelDataCommand(args);
544
- if (typeof optionsOrCb === "function") {
545
- this.send(command, optionsOrCb);
546
- } else if (typeof cb === "function") {
547
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
548
- this.send(command, optionsOrCb || {}, cb);
549
- } else {
550
- return this.send(command, optionsOrCb);
551
- }
552
- }
553
- }