@googleapis/translate 6.0.0 → 7.1.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 +25 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/v2.js.map +1 -1
- package/build/v3.d.ts +165 -21
- package/build/v3.js +32 -0
- package/build/v3.js.map +1 -1
- package/build/v3beta1.d.ts +149 -11
- package/build/v3beta1.js +32 -0
- package/build/v3beta1.js.map +1 -1
- package/package.json +1 -1
- package/v2.ts +3 -6
- package/v3.ts +293 -121
- package/v3beta1.ts +247 -51
package/v3beta1.ts
CHANGED
|
@@ -178,12 +178,16 @@ export namespace translate_v3beta1 {
|
|
|
178
178
|
* Required. Output configuration. If 2 input configs match to the same file (that is, same input path), we don't generate output for duplicate inputs.
|
|
179
179
|
*/
|
|
180
180
|
outputConfig?: Schema$BatchDocumentOutputConfig;
|
|
181
|
+
/**
|
|
182
|
+
* Optional. If true, only native pdf pages will be translated.
|
|
183
|
+
*/
|
|
184
|
+
pdfNativeOnly?: boolean | null;
|
|
181
185
|
/**
|
|
182
186
|
* Required. The BCP-47 language code of the input document if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in [Language Support](https://cloud.google.com/translate/docs/languages).
|
|
183
187
|
*/
|
|
184
188
|
sourceLanguageCode?: string | null;
|
|
185
189
|
/**
|
|
186
|
-
* Required. The BCP-47 language code to use for translation of the input document. Specify up to 10 language codes here.
|
|
190
|
+
* Required. The BCP-47 language code to use for translation of the input document. Specify up to 10 language codes here. Supported language codes are listed in [Language Support](https://cloud.google.com/translate/docs/languages).
|
|
187
191
|
*/
|
|
188
192
|
targetLanguageCodes?: string[] | null;
|
|
189
193
|
}
|
|
@@ -212,11 +216,11 @@ export namespace translate_v3beta1 {
|
|
|
212
216
|
*/
|
|
213
217
|
outputConfig?: Schema$OutputConfig;
|
|
214
218
|
/**
|
|
215
|
-
* Required. Source language code.
|
|
219
|
+
* Required. Source language code. Supported language codes are listed in [Language Support](https://cloud.google.com/translate/docs/languages).
|
|
216
220
|
*/
|
|
217
221
|
sourceLanguageCode?: string | null;
|
|
218
222
|
/**
|
|
219
|
-
* Required. Specify up to 10 language codes here.
|
|
223
|
+
* Required. Specify up to 10 language codes here. Supported language codes are listed in [Language Support](https://cloud.google.com/translate/docs/languages).
|
|
220
224
|
*/
|
|
221
225
|
targetLanguageCodes?: string[] | null;
|
|
222
226
|
}
|
|
@@ -451,6 +455,10 @@ export namespace translate_v3beta1 {
|
|
|
451
455
|
* A list of operations that matches the specified filter in the request.
|
|
452
456
|
*/
|
|
453
457
|
operations?: Schema$Operation[];
|
|
458
|
+
/**
|
|
459
|
+
* Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations.
|
|
460
|
+
*/
|
|
461
|
+
unreachable?: string[] | null;
|
|
454
462
|
}
|
|
455
463
|
/**
|
|
456
464
|
* A resource that represents a Google Cloud location.
|
|
@@ -511,6 +519,45 @@ export namespace translate_v3beta1 {
|
|
|
511
519
|
*/
|
|
512
520
|
gcsDestination?: Schema$GcsDestination;
|
|
513
521
|
}
|
|
522
|
+
/**
|
|
523
|
+
* A single refinement entry for RefineTextRequest.
|
|
524
|
+
*/
|
|
525
|
+
export interface Schema$RefinementEntry {
|
|
526
|
+
/**
|
|
527
|
+
* Required. The original translation of the source text.
|
|
528
|
+
*/
|
|
529
|
+
originalTranslation?: string | null;
|
|
530
|
+
/**
|
|
531
|
+
* Required. The source text to be refined.
|
|
532
|
+
*/
|
|
533
|
+
sourceText?: string | null;
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* Request message for RefineText.
|
|
537
|
+
*/
|
|
538
|
+
export interface Schema$RefineTextRequest {
|
|
539
|
+
/**
|
|
540
|
+
* Required. The source texts and original translations in the source and target languages.
|
|
541
|
+
*/
|
|
542
|
+
refinementEntries?: Schema$RefinementEntry[];
|
|
543
|
+
/**
|
|
544
|
+
* Required. The BCP-47 language code of the source text in the request, for example, "en-US".
|
|
545
|
+
*/
|
|
546
|
+
sourceLanguageCode?: string | null;
|
|
547
|
+
/**
|
|
548
|
+
* Required. The BCP-47 language code for translation output, for example, "zh-CN".
|
|
549
|
+
*/
|
|
550
|
+
targetLanguageCode?: string | null;
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* Response message for RefineText.
|
|
554
|
+
*/
|
|
555
|
+
export interface Schema$RefineTextResponse {
|
|
556
|
+
/**
|
|
557
|
+
* The refined translations obtained from the original translations.
|
|
558
|
+
*/
|
|
559
|
+
refinedTranslations?: string[] | null;
|
|
560
|
+
}
|
|
514
561
|
/**
|
|
515
562
|
* The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
|
|
516
563
|
*/
|
|
@@ -599,11 +646,11 @@ export namespace translate_v3beta1 {
|
|
|
599
646
|
*/
|
|
600
647
|
model?: string | null;
|
|
601
648
|
/**
|
|
602
|
-
* Optional. The BCP-47 language code of the input document if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in Language Support. If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language within the response. Source language must be specified if the request contains a glossary or a custom model.
|
|
649
|
+
* Optional. The BCP-47 language code of the input document if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in [Language Support](https://cloud.google.com/translate/docs/languages). If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language within the response. Source language must be specified if the request contains a glossary or a custom model.
|
|
603
650
|
*/
|
|
604
651
|
sourceLanguageCode?: string | null;
|
|
605
652
|
/**
|
|
606
|
-
* Required. The BCP-47 language code to use for translation of the input document, set to one of the language codes listed in Language Support.
|
|
653
|
+
* Required. The BCP-47 language code to use for translation of the input document, set to one of the language codes listed in [Language Support](https://cloud.google.com/translate/docs/languages).
|
|
607
654
|
*/
|
|
608
655
|
targetLanguageCode?: string | null;
|
|
609
656
|
}
|
|
@@ -629,7 +676,7 @@ export namespace translate_v3beta1 {
|
|
|
629
676
|
model?: string | null;
|
|
630
677
|
}
|
|
631
678
|
/**
|
|
632
|
-
*
|
|
679
|
+
* Configures which glossary should be used for a specific target language, and defines options for applying that glossary.
|
|
633
680
|
*/
|
|
634
681
|
export interface Schema$TranslateTextGlossaryConfig {
|
|
635
682
|
/**
|
|
@@ -670,11 +717,11 @@ export namespace translate_v3beta1 {
|
|
|
670
717
|
*/
|
|
671
718
|
model?: string | null;
|
|
672
719
|
/**
|
|
673
|
-
* Optional. The BCP-47 language code of the input text if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in Language Support. If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language within the response.
|
|
720
|
+
* Optional. The BCP-47 language code of the input text if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in [Language Support](https://cloud.google.com/translate/docs/languages). If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language within the response.
|
|
674
721
|
*/
|
|
675
722
|
sourceLanguageCode?: string | null;
|
|
676
723
|
/**
|
|
677
|
-
* Required. The BCP-47 language code to use for translation of the input text, set to one of the language codes listed in Language Support.
|
|
724
|
+
* Required. The BCP-47 language code to use for translation of the input text, set to one of the language codes listed in [Language Support](https://cloud.google.com/translate/docs/languages).
|
|
678
725
|
*/
|
|
679
726
|
targetLanguageCode?: string | null;
|
|
680
727
|
}
|
|
@@ -1188,8 +1235,7 @@ export namespace translate_v3beta1 {
|
|
|
1188
1235
|
}
|
|
1189
1236
|
}
|
|
1190
1237
|
|
|
1191
|
-
export interface Params$Resource$Projects$Detectlanguage
|
|
1192
|
-
extends StandardParameters {
|
|
1238
|
+
export interface Params$Resource$Projects$Detectlanguage extends StandardParameters {
|
|
1193
1239
|
/**
|
|
1194
1240
|
* Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id\}/locations/{location-id\}` or `projects/{project-number-or-id\}`. For global calls, use `projects/{project-number-or-id\}/locations/global` or `projects/{project-number-or-id\}`. Only models within the same region (has same location-id) can be used. Otherwise an INVALID_ARGUMENT (400) error is returned.
|
|
1195
1241
|
*/
|
|
@@ -1200,8 +1246,7 @@ export namespace translate_v3beta1 {
|
|
|
1200
1246
|
*/
|
|
1201
1247
|
requestBody?: Schema$DetectLanguageRequest;
|
|
1202
1248
|
}
|
|
1203
|
-
export interface Params$Resource$Projects$Getsupportedlanguages
|
|
1204
|
-
extends StandardParameters {
|
|
1249
|
+
export interface Params$Resource$Projects$Getsupportedlanguages extends StandardParameters {
|
|
1205
1250
|
/**
|
|
1206
1251
|
* Optional. The language to use to return localized, human readable names of supported languages. If missing, then display names are not returned in a response.
|
|
1207
1252
|
*/
|
|
@@ -1215,8 +1260,7 @@ export namespace translate_v3beta1 {
|
|
|
1215
1260
|
*/
|
|
1216
1261
|
parent?: string;
|
|
1217
1262
|
}
|
|
1218
|
-
export interface Params$Resource$Projects$Translatetext
|
|
1219
|
-
extends StandardParameters {
|
|
1263
|
+
export interface Params$Resource$Projects$Translatetext extends StandardParameters {
|
|
1220
1264
|
/**
|
|
1221
1265
|
* Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id\}` or `projects/{project-number-or-id\}/locations/{location-id\}`. For global calls, use `projects/{project-number-or-id\}/locations/global` or `projects/{project-number-or-id\}`. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.
|
|
1222
1266
|
*/
|
|
@@ -1291,6 +1335,7 @@ export namespace translate_v3beta1 {
|
|
|
1291
1335
|
* // "inputConfigs": [],
|
|
1292
1336
|
* // "models": {},
|
|
1293
1337
|
* // "outputConfig": {},
|
|
1338
|
+
* // "pdfNativeOnly": false,
|
|
1294
1339
|
* // "sourceLanguageCode": "my_sourceLanguageCode",
|
|
1295
1340
|
* // "targetLanguageCodes": []
|
|
1296
1341
|
* // }
|
|
@@ -2039,7 +2084,7 @@ export namespace translate_v3beta1 {
|
|
|
2039
2084
|
*
|
|
2040
2085
|
* // Do the magic
|
|
2041
2086
|
* const res = await translate.projects.locations.list({
|
|
2042
|
-
* // Optional.
|
|
2087
|
+
* // Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.
|
|
2043
2088
|
* extraLocationTypes: 'placeholder-value',
|
|
2044
2089
|
* // A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).
|
|
2045
2090
|
* filter: 'placeholder-value',
|
|
@@ -2156,6 +2201,156 @@ export namespace translate_v3beta1 {
|
|
|
2156
2201
|
}
|
|
2157
2202
|
}
|
|
2158
2203
|
|
|
2204
|
+
/**
|
|
2205
|
+
* Refines the input translated text to improve the quality.
|
|
2206
|
+
* @example
|
|
2207
|
+
* ```js
|
|
2208
|
+
* // Before running the sample:
|
|
2209
|
+
* // - Enable the API at:
|
|
2210
|
+
* // https://console.developers.google.com/apis/api/translate.googleapis.com
|
|
2211
|
+
* // - Login into gcloud by running:
|
|
2212
|
+
* // ```sh
|
|
2213
|
+
* // $ gcloud auth application-default login
|
|
2214
|
+
* // ```
|
|
2215
|
+
* // - Install the npm module by running:
|
|
2216
|
+
* // ```sh
|
|
2217
|
+
* // $ npm install googleapis
|
|
2218
|
+
* // ```
|
|
2219
|
+
*
|
|
2220
|
+
* const {google} = require('googleapis');
|
|
2221
|
+
* const translate = google.translate('v3beta1');
|
|
2222
|
+
*
|
|
2223
|
+
* async function main() {
|
|
2224
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2225
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2226
|
+
* scopes: [
|
|
2227
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
2228
|
+
* 'https://www.googleapis.com/auth/cloud-translation',
|
|
2229
|
+
* ],
|
|
2230
|
+
* });
|
|
2231
|
+
*
|
|
2232
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2233
|
+
* const authClient = await auth.getClient();
|
|
2234
|
+
* google.options({auth: authClient});
|
|
2235
|
+
*
|
|
2236
|
+
* // Do the magic
|
|
2237
|
+
* const res = await translate.projects.locations.refineText({
|
|
2238
|
+
* // Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id\}/locations/{location-id\}`. For global calls, use `projects/{project-number-or-id\}/locations/global` or `projects/{project-number-or-id\}`.
|
|
2239
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
2240
|
+
*
|
|
2241
|
+
* // Request body metadata
|
|
2242
|
+
* requestBody: {
|
|
2243
|
+
* // request body parameters
|
|
2244
|
+
* // {
|
|
2245
|
+
* // "refinementEntries": [],
|
|
2246
|
+
* // "sourceLanguageCode": "my_sourceLanguageCode",
|
|
2247
|
+
* // "targetLanguageCode": "my_targetLanguageCode"
|
|
2248
|
+
* // }
|
|
2249
|
+
* },
|
|
2250
|
+
* });
|
|
2251
|
+
* console.log(res.data);
|
|
2252
|
+
*
|
|
2253
|
+
* // Example response
|
|
2254
|
+
* // {
|
|
2255
|
+
* // "refinedTranslations": []
|
|
2256
|
+
* // }
|
|
2257
|
+
* }
|
|
2258
|
+
*
|
|
2259
|
+
* main().catch(e => {
|
|
2260
|
+
* console.error(e);
|
|
2261
|
+
* throw e;
|
|
2262
|
+
* });
|
|
2263
|
+
*
|
|
2264
|
+
* ```
|
|
2265
|
+
*
|
|
2266
|
+
* @param params - Parameters for request
|
|
2267
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2268
|
+
* @param callback - Optional callback that handles the response.
|
|
2269
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2270
|
+
*/
|
|
2271
|
+
refineText(
|
|
2272
|
+
params: Params$Resource$Projects$Locations$Refinetext,
|
|
2273
|
+
options: StreamMethodOptions
|
|
2274
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2275
|
+
refineText(
|
|
2276
|
+
params?: Params$Resource$Projects$Locations$Refinetext,
|
|
2277
|
+
options?: MethodOptions
|
|
2278
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$RefineTextResponse>>;
|
|
2279
|
+
refineText(
|
|
2280
|
+
params: Params$Resource$Projects$Locations$Refinetext,
|
|
2281
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
2282
|
+
callback: BodyResponseCallback<Readable>
|
|
2283
|
+
): void;
|
|
2284
|
+
refineText(
|
|
2285
|
+
params: Params$Resource$Projects$Locations$Refinetext,
|
|
2286
|
+
options: MethodOptions | BodyResponseCallback<Schema$RefineTextResponse>,
|
|
2287
|
+
callback: BodyResponseCallback<Schema$RefineTextResponse>
|
|
2288
|
+
): void;
|
|
2289
|
+
refineText(
|
|
2290
|
+
params: Params$Resource$Projects$Locations$Refinetext,
|
|
2291
|
+
callback: BodyResponseCallback<Schema$RefineTextResponse>
|
|
2292
|
+
): void;
|
|
2293
|
+
refineText(callback: BodyResponseCallback<Schema$RefineTextResponse>): void;
|
|
2294
|
+
refineText(
|
|
2295
|
+
paramsOrCallback?:
|
|
2296
|
+
| Params$Resource$Projects$Locations$Refinetext
|
|
2297
|
+
| BodyResponseCallback<Schema$RefineTextResponse>
|
|
2298
|
+
| BodyResponseCallback<Readable>,
|
|
2299
|
+
optionsOrCallback?:
|
|
2300
|
+
| MethodOptions
|
|
2301
|
+
| StreamMethodOptions
|
|
2302
|
+
| BodyResponseCallback<Schema$RefineTextResponse>
|
|
2303
|
+
| BodyResponseCallback<Readable>,
|
|
2304
|
+
callback?:
|
|
2305
|
+
| BodyResponseCallback<Schema$RefineTextResponse>
|
|
2306
|
+
| BodyResponseCallback<Readable>
|
|
2307
|
+
):
|
|
2308
|
+
| void
|
|
2309
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$RefineTextResponse>>
|
|
2310
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
2311
|
+
let params = (paramsOrCallback ||
|
|
2312
|
+
{}) as Params$Resource$Projects$Locations$Refinetext;
|
|
2313
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
2314
|
+
|
|
2315
|
+
if (typeof paramsOrCallback === 'function') {
|
|
2316
|
+
callback = paramsOrCallback;
|
|
2317
|
+
params = {} as Params$Resource$Projects$Locations$Refinetext;
|
|
2318
|
+
options = {};
|
|
2319
|
+
}
|
|
2320
|
+
|
|
2321
|
+
if (typeof optionsOrCallback === 'function') {
|
|
2322
|
+
callback = optionsOrCallback;
|
|
2323
|
+
options = {};
|
|
2324
|
+
}
|
|
2325
|
+
|
|
2326
|
+
const rootUrl = options.rootUrl || 'https://translation.googleapis.com/';
|
|
2327
|
+
const parameters = {
|
|
2328
|
+
options: Object.assign(
|
|
2329
|
+
{
|
|
2330
|
+
url: (rootUrl + '/v3beta1/{+parent}:refineText').replace(
|
|
2331
|
+
/([^:]\/)\/+/g,
|
|
2332
|
+
'$1'
|
|
2333
|
+
),
|
|
2334
|
+
method: 'POST',
|
|
2335
|
+
apiVersion: '',
|
|
2336
|
+
},
|
|
2337
|
+
options
|
|
2338
|
+
),
|
|
2339
|
+
params,
|
|
2340
|
+
requiredParams: ['parent'],
|
|
2341
|
+
pathParams: ['parent'],
|
|
2342
|
+
context: this.context,
|
|
2343
|
+
};
|
|
2344
|
+
if (callback) {
|
|
2345
|
+
createAPIRequest<Schema$RefineTextResponse>(
|
|
2346
|
+
parameters,
|
|
2347
|
+
callback as BodyResponseCallback<unknown>
|
|
2348
|
+
);
|
|
2349
|
+
} else {
|
|
2350
|
+
return createAPIRequest<Schema$RefineTextResponse>(parameters);
|
|
2351
|
+
}
|
|
2352
|
+
}
|
|
2353
|
+
|
|
2159
2354
|
/**
|
|
2160
2355
|
* Translates documents in synchronous mode.
|
|
2161
2356
|
* @example
|
|
@@ -2481,8 +2676,7 @@ export namespace translate_v3beta1 {
|
|
|
2481
2676
|
}
|
|
2482
2677
|
}
|
|
2483
2678
|
|
|
2484
|
-
export interface Params$Resource$Projects$Locations$Batchtranslatedocument
|
|
2485
|
-
extends StandardParameters {
|
|
2679
|
+
export interface Params$Resource$Projects$Locations$Batchtranslatedocument extends StandardParameters {
|
|
2486
2680
|
/**
|
|
2487
2681
|
* Required. Location to make a regional call. Format: `projects/{project-number-or-id\}/locations/{location-id\}`. The `global` location is not supported for batch translation. Only AutoML Translation models or glossaries within the same region (have the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned.
|
|
2488
2682
|
*/
|
|
@@ -2493,8 +2687,7 @@ export namespace translate_v3beta1 {
|
|
|
2493
2687
|
*/
|
|
2494
2688
|
requestBody?: Schema$BatchTranslateDocumentRequest;
|
|
2495
2689
|
}
|
|
2496
|
-
export interface Params$Resource$Projects$Locations$Batchtranslatetext
|
|
2497
|
-
extends StandardParameters {
|
|
2690
|
+
export interface Params$Resource$Projects$Locations$Batchtranslatetext extends StandardParameters {
|
|
2498
2691
|
/**
|
|
2499
2692
|
* Required. Location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id\}/locations/{location-id\}`. The `global` location is not supported for batch translation. Only AutoML Translation models or glossaries within the same region (have the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned.
|
|
2500
2693
|
*/
|
|
@@ -2505,8 +2698,7 @@ export namespace translate_v3beta1 {
|
|
|
2505
2698
|
*/
|
|
2506
2699
|
requestBody?: Schema$BatchTranslateTextRequest;
|
|
2507
2700
|
}
|
|
2508
|
-
export interface Params$Resource$Projects$Locations$Detectlanguage
|
|
2509
|
-
extends StandardParameters {
|
|
2701
|
+
export interface Params$Resource$Projects$Locations$Detectlanguage extends StandardParameters {
|
|
2510
2702
|
/**
|
|
2511
2703
|
* Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id\}/locations/{location-id\}` or `projects/{project-number-or-id\}`. For global calls, use `projects/{project-number-or-id\}/locations/global` or `projects/{project-number-or-id\}`. Only models within the same region (has same location-id) can be used. Otherwise an INVALID_ARGUMENT (400) error is returned.
|
|
2512
2704
|
*/
|
|
@@ -2517,15 +2709,13 @@ export namespace translate_v3beta1 {
|
|
|
2517
2709
|
*/
|
|
2518
2710
|
requestBody?: Schema$DetectLanguageRequest;
|
|
2519
2711
|
}
|
|
2520
|
-
export interface Params$Resource$Projects$Locations$Get
|
|
2521
|
-
extends StandardParameters {
|
|
2712
|
+
export interface Params$Resource$Projects$Locations$Get extends StandardParameters {
|
|
2522
2713
|
/**
|
|
2523
2714
|
* Resource name for the location.
|
|
2524
2715
|
*/
|
|
2525
2716
|
name?: string;
|
|
2526
2717
|
}
|
|
2527
|
-
export interface Params$Resource$Projects$Locations$Getsupportedlanguages
|
|
2528
|
-
extends StandardParameters {
|
|
2718
|
+
export interface Params$Resource$Projects$Locations$Getsupportedlanguages extends StandardParameters {
|
|
2529
2719
|
/**
|
|
2530
2720
|
* Optional. The language to use to return localized, human readable names of supported languages. If missing, then display names are not returned in a response.
|
|
2531
2721
|
*/
|
|
@@ -2539,10 +2729,9 @@ export namespace translate_v3beta1 {
|
|
|
2539
2729
|
*/
|
|
2540
2730
|
parent?: string;
|
|
2541
2731
|
}
|
|
2542
|
-
export interface Params$Resource$Projects$Locations$List
|
|
2543
|
-
extends StandardParameters {
|
|
2732
|
+
export interface Params$Resource$Projects$Locations$List extends StandardParameters {
|
|
2544
2733
|
/**
|
|
2545
|
-
* Optional.
|
|
2734
|
+
* Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.
|
|
2546
2735
|
*/
|
|
2547
2736
|
extraLocationTypes?: string[];
|
|
2548
2737
|
/**
|
|
@@ -2562,8 +2751,18 @@ export namespace translate_v3beta1 {
|
|
|
2562
2751
|
*/
|
|
2563
2752
|
pageToken?: string;
|
|
2564
2753
|
}
|
|
2565
|
-
export interface Params$Resource$Projects$Locations$
|
|
2566
|
-
|
|
2754
|
+
export interface Params$Resource$Projects$Locations$Refinetext extends StandardParameters {
|
|
2755
|
+
/**
|
|
2756
|
+
* Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id\}/locations/{location-id\}`. For global calls, use `projects/{project-number-or-id\}/locations/global` or `projects/{project-number-or-id\}`.
|
|
2757
|
+
*/
|
|
2758
|
+
parent?: string;
|
|
2759
|
+
|
|
2760
|
+
/**
|
|
2761
|
+
* Request body metadata
|
|
2762
|
+
*/
|
|
2763
|
+
requestBody?: Schema$RefineTextRequest;
|
|
2764
|
+
}
|
|
2765
|
+
export interface Params$Resource$Projects$Locations$Translatedocument extends StandardParameters {
|
|
2567
2766
|
/**
|
|
2568
2767
|
* Required. Location to make a regional call. Format: `projects/{project-number-or-id\}/locations/{location-id\}`. For global calls, use `projects/{project-number-or-id\}/locations/global`. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have the same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.
|
|
2569
2768
|
*/
|
|
@@ -2574,8 +2773,7 @@ export namespace translate_v3beta1 {
|
|
|
2574
2773
|
*/
|
|
2575
2774
|
requestBody?: Schema$TranslateDocumentRequest;
|
|
2576
2775
|
}
|
|
2577
|
-
export interface Params$Resource$Projects$Locations$Translatetext
|
|
2578
|
-
extends StandardParameters {
|
|
2776
|
+
export interface Params$Resource$Projects$Locations$Translatetext extends StandardParameters {
|
|
2579
2777
|
/**
|
|
2580
2778
|
* Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id\}` or `projects/{project-number-or-id\}/locations/{location-id\}`. For global calls, use `projects/{project-number-or-id\}/locations/global` or `projects/{project-number-or-id\}`. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.
|
|
2581
2779
|
*/
|
|
@@ -3185,8 +3383,7 @@ export namespace translate_v3beta1 {
|
|
|
3185
3383
|
}
|
|
3186
3384
|
}
|
|
3187
3385
|
|
|
3188
|
-
export interface Params$Resource$Projects$Locations$Glossaries$Create
|
|
3189
|
-
extends StandardParameters {
|
|
3386
|
+
export interface Params$Resource$Projects$Locations$Glossaries$Create extends StandardParameters {
|
|
3190
3387
|
/**
|
|
3191
3388
|
* Required. The project name.
|
|
3192
3389
|
*/
|
|
@@ -3197,22 +3394,19 @@ export namespace translate_v3beta1 {
|
|
|
3197
3394
|
*/
|
|
3198
3395
|
requestBody?: Schema$Glossary;
|
|
3199
3396
|
}
|
|
3200
|
-
export interface Params$Resource$Projects$Locations$Glossaries$Delete
|
|
3201
|
-
extends StandardParameters {
|
|
3397
|
+
export interface Params$Resource$Projects$Locations$Glossaries$Delete extends StandardParameters {
|
|
3202
3398
|
/**
|
|
3203
3399
|
* Required. The name of the glossary to delete.
|
|
3204
3400
|
*/
|
|
3205
3401
|
name?: string;
|
|
3206
3402
|
}
|
|
3207
|
-
export interface Params$Resource$Projects$Locations$Glossaries$Get
|
|
3208
|
-
extends StandardParameters {
|
|
3403
|
+
export interface Params$Resource$Projects$Locations$Glossaries$Get extends StandardParameters {
|
|
3209
3404
|
/**
|
|
3210
3405
|
* Required. The name of the glossary to retrieve.
|
|
3211
3406
|
*/
|
|
3212
3407
|
name?: string;
|
|
3213
3408
|
}
|
|
3214
|
-
export interface Params$Resource$Projects$Locations$Glossaries$List
|
|
3215
|
-
extends StandardParameters {
|
|
3409
|
+
export interface Params$Resource$Projects$Locations$Glossaries$List extends StandardParameters {
|
|
3216
3410
|
/**
|
|
3217
3411
|
* Optional. Filter specifying constraints of a list operation. Specify the constraint by the format of "key=value", where key must be "src" or "tgt", and the value must be a valid language code. For multiple restrictions, concatenate them by "AND" (uppercase only), such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used here, which means using 'en-US' and 'en' can lead to different results, which depends on the language code you used when you create the glossary. For the unidirectional glossaries, the "src" and "tgt" add restrictions on the source and target language code separately. For the equivalent term set glossaries, the "src" and/or "tgt" add restrictions on the term set. For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional glossaries which exactly match the source language code as "en-US" and the target language code "zh-CN", but all equivalent term set glossaries which contain "en-US" and "zh-CN" in their language set will be picked. If missing, no filtering is performed.
|
|
3218
3412
|
*/
|
|
@@ -3699,13 +3893,16 @@ export namespace translate_v3beta1 {
|
|
|
3699
3893
|
* pageSize: 'placeholder-value',
|
|
3700
3894
|
* // The standard list page token.
|
|
3701
3895
|
* pageToken: 'placeholder-value',
|
|
3896
|
+
* // When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `"projects/example/locations/-"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.
|
|
3897
|
+
* returnPartialSuccess: 'placeholder-value',
|
|
3702
3898
|
* });
|
|
3703
3899
|
* console.log(res.data);
|
|
3704
3900
|
*
|
|
3705
3901
|
* // Example response
|
|
3706
3902
|
* // {
|
|
3707
3903
|
* // "nextPageToken": "my_nextPageToken",
|
|
3708
|
-
* // "operations": []
|
|
3904
|
+
* // "operations": [],
|
|
3905
|
+
* // "unreachable": []
|
|
3709
3906
|
* // }
|
|
3710
3907
|
* }
|
|
3711
3908
|
*
|
|
@@ -3959,8 +4156,7 @@ export namespace translate_v3beta1 {
|
|
|
3959
4156
|
}
|
|
3960
4157
|
}
|
|
3961
4158
|
|
|
3962
|
-
export interface Params$Resource$Projects$Locations$Operations$Cancel
|
|
3963
|
-
extends StandardParameters {
|
|
4159
|
+
export interface Params$Resource$Projects$Locations$Operations$Cancel extends StandardParameters {
|
|
3964
4160
|
/**
|
|
3965
4161
|
* The name of the operation resource to be cancelled.
|
|
3966
4162
|
*/
|
|
@@ -3971,22 +4167,19 @@ export namespace translate_v3beta1 {
|
|
|
3971
4167
|
*/
|
|
3972
4168
|
requestBody?: Schema$CancelOperationRequest;
|
|
3973
4169
|
}
|
|
3974
|
-
export interface Params$Resource$Projects$Locations$Operations$Delete
|
|
3975
|
-
extends StandardParameters {
|
|
4170
|
+
export interface Params$Resource$Projects$Locations$Operations$Delete extends StandardParameters {
|
|
3976
4171
|
/**
|
|
3977
4172
|
* The name of the operation resource to be deleted.
|
|
3978
4173
|
*/
|
|
3979
4174
|
name?: string;
|
|
3980
4175
|
}
|
|
3981
|
-
export interface Params$Resource$Projects$Locations$Operations$Get
|
|
3982
|
-
extends StandardParameters {
|
|
4176
|
+
export interface Params$Resource$Projects$Locations$Operations$Get extends StandardParameters {
|
|
3983
4177
|
/**
|
|
3984
4178
|
* The name of the operation resource.
|
|
3985
4179
|
*/
|
|
3986
4180
|
name?: string;
|
|
3987
4181
|
}
|
|
3988
|
-
export interface Params$Resource$Projects$Locations$Operations$List
|
|
3989
|
-
extends StandardParameters {
|
|
4182
|
+
export interface Params$Resource$Projects$Locations$Operations$List extends StandardParameters {
|
|
3990
4183
|
/**
|
|
3991
4184
|
* The standard list filter.
|
|
3992
4185
|
*/
|
|
@@ -4003,9 +4196,12 @@ export namespace translate_v3beta1 {
|
|
|
4003
4196
|
* The standard list page token.
|
|
4004
4197
|
*/
|
|
4005
4198
|
pageToken?: string;
|
|
4199
|
+
/**
|
|
4200
|
+
* When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `"projects/example/locations/-"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.
|
|
4201
|
+
*/
|
|
4202
|
+
returnPartialSuccess?: boolean;
|
|
4006
4203
|
}
|
|
4007
|
-
export interface Params$Resource$Projects$Locations$Operations$Wait
|
|
4008
|
-
extends StandardParameters {
|
|
4204
|
+
export interface Params$Resource$Projects$Locations$Operations$Wait extends StandardParameters {
|
|
4009
4205
|
/**
|
|
4010
4206
|
* The name of the operation resource to wait on.
|
|
4011
4207
|
*/
|